D
David K.
I've created a invoice numbering system based on a combination of the current
year and week number plus a 3-digit consecutive number. The format is
YYWW###. Starting today, the report number will look like this; 0849000,
0849001, etc. On the following Monday the week would change to 50 and the
report number would be as such; 0850002, 0850003, etc. Come January 1st,
the first report number created would look like this; 0901000.
I would like the 3-digit number to restart at 000 or 001 at the beginning of
each year depending on what is possible and/or easier to do in Access. FYI,
we will never create more than a couple hundred in one year.
I have one table called tblNCDateStart that has two fields; ReportDate &
NCStart:
tblNCDateStart
ReportDate
Data Type / Long Int.
Format / 0000
Default Value / =Format(Date(),"yy") & "" & Format(Date(),"ww")
'creates current 4-digit yyww number; 0849, 0850...0901, 0902, etc...
NCStart
Data Type = Long Int.
Format = 000
Another table named NCReportLog will be used to store each individual
nonconformance instance.
tbleNCReportLog
NCID 'Autonumber & Primary Key
NCRepNum 'this is where I want to store the 7-digit yyww### number
DateInitiated
CustID
PartNumID
...
Here are my questions I was hoping to get some help with. I'm new at this
so if this requires a bit of code with event procedures could you help me out?
1) I will create a form (frmNCReportLog) to enter nonconformance instances.
How would I set up the form to create (concatenate ReportDate & NCStart) and
then store the NCRepNum in the tblNCReportLog? I was thinking that the
number could either be created upon opening up a new form entry or by
creating a "Get NC No." button.
2) I also want the NCReportNum to increment by +1 for each consecutive
entry. From fishing through the forum it seems that I would use DMax but I'm
a bit confused with the syntax and where to put it.
3) How can I set up the system to automatically reset the 3-digit suffix
back to 000 on January 1st each year.
Thanks in advance.
year and week number plus a 3-digit consecutive number. The format is
YYWW###. Starting today, the report number will look like this; 0849000,
0849001, etc. On the following Monday the week would change to 50 and the
report number would be as such; 0850002, 0850003, etc. Come January 1st,
the first report number created would look like this; 0901000.
I would like the 3-digit number to restart at 000 or 001 at the beginning of
each year depending on what is possible and/or easier to do in Access. FYI,
we will never create more than a couple hundred in one year.
I have one table called tblNCDateStart that has two fields; ReportDate &
NCStart:
tblNCDateStart
ReportDate
Data Type / Long Int.
Format / 0000
Default Value / =Format(Date(),"yy") & "" & Format(Date(),"ww")
'creates current 4-digit yyww number; 0849, 0850...0901, 0902, etc...
NCStart
Data Type = Long Int.
Format = 000
Another table named NCReportLog will be used to store each individual
nonconformance instance.
tbleNCReportLog
NCID 'Autonumber & Primary Key
NCRepNum 'this is where I want to store the 7-digit yyww### number
DateInitiated
CustID
PartNumID
...
Here are my questions I was hoping to get some help with. I'm new at this
so if this requires a bit of code with event procedures could you help me out?
1) I will create a form (frmNCReportLog) to enter nonconformance instances.
How would I set up the form to create (concatenate ReportDate & NCStart) and
then store the NCRepNum in the tblNCReportLog? I was thinking that the
number could either be created upon opening up a new form entry or by
creating a "Get NC No." button.
2) I also want the NCReportNum to increment by +1 for each consecutive
entry. From fishing through the forum it seems that I would use DMax but I'm
a bit confused with the syntax and where to put it.
3) How can I set up the system to automatically reset the 3-digit suffix
back to 000 on January 1st each year.
Thanks in advance.