If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Incrementing journal voucher number
I creating a form that will need a field that will have a JV field that needs
to increment when a new record is created. The field is 12 characters long with the last four digits incrementing, JV12TP09_ _ _ _. The JV and TP are always the same the 12 is the current month and 09 is the calendar year. Can anyone help me in creating such a number on a form. Thanks!! Using Access 2003. -- Di~ |
#2
|
|||
|
|||
Incrementing journal voucher number
You will need to get the 4-digit last number assigned from the table using
the DMAX function (look in Access HELP). While you are in Help, read up on the DatePart function. Then you create the number with: JV = "JV" & right$("00" & DatePart("m",date()),2) & "TP" & right$(DatePart("yyyy",date()),2) & Right$("0000" & CStr(LastNumber +1),4) I'm assuming all numbers must be left zero-filled. -Dorian "DBoyd" wrote: I creating a form that will need a field that will have a JV field that needs to increment when a new record is created. The field is 12 characters long with the last four digits incrementing, JV12TP09_ _ _ _. The JV and TP are always the same the 12 is the current month and 09 is the calendar year. Can anyone help me in creating such a number on a form. Thanks!! Using Access 2003. -- Di~ |
Thread Tools | |
Display Modes | |
|
|