S
Susanne
I've tried so many times to get this without asking for help.
I have a number field containing the current date in yyyymmdd format (this
is being used as a reference number). Then, there is a customer number of
that day (we are taking orders) formatted 000 (first order of that day is
001, second is 002, etc.). So the order number will officially become
"yyyymmdd-001" (20081101-001) or even "yyyymmdd-025" (20081101-025). I want
the form on the "On Current" event to fill in the next number automatically.
The next day it would start back at 001 since the job number field will be
set to the new date.
This is one version of what I've tried:
Me.Job_CustomerNumber.DefaultValue = DMax("[Job_CustomerNumber]",
"tbl_Orders", "Job_Number = " & Job_Number, 0) + 1
I can't recall them all, but none of them work. I've tried doing a format
on the job_number as well as creating a new variable to have the Job_Number
set to to get the layout and answer I want.
Does anyone have any suggestions? If I need to explain further, please let
me know.
Thanks in advance!
I have a number field containing the current date in yyyymmdd format (this
is being used as a reference number). Then, there is a customer number of
that day (we are taking orders) formatted 000 (first order of that day is
001, second is 002, etc.). So the order number will officially become
"yyyymmdd-001" (20081101-001) or even "yyyymmdd-025" (20081101-025). I want
the form on the "On Current" event to fill in the next number automatically.
The next day it would start back at 001 since the job number field will be
set to the new date.
This is one version of what I've tried:
Me.Job_CustomerNumber.DefaultValue = DMax("[Job_CustomerNumber]",
"tbl_Orders", "Job_Number = " & Job_Number, 0) + 1
I can't recall them all, but none of them work. I've tried doing a format
on the job_number as well as creating a new variable to have the Job_Number
set to to get the layout and answer I want.
Does anyone have any suggestions? If I need to explain further, please let
me know.
Thanks in advance!