Ok, i am desperatly seeking a solution for this problem i have been trying to solve for the last 3 weeks.
I have a data entry form, by which a user will select a created date, their initials fro ma list box and enter a number into field. From these three pieces of info, i want to auto generate a number in the following format
DQC-R-MMDDYYYY-Initials-###. Where DQC-R is a constant that will always apear, the date is the day chosen by the user, the intials are selected from the list box, and hte ### is entered into the numbers field.
DQC-R-05262011-JF-01 for instance if i chose today, my initlas and the number 01. So far, through trial and error. i have come up with the following code in the after update event for the ### field.
Private Sub RecordNumber_AfterUpdate()
Dim RecordNumber As String
RecordID = "DQC-R-" & [Record Inventory]![CreatedDate] & "mmddyyyy" & Me.Technician & "-" & Me.RecordNubmer
End Sub
To me this looks like it should work, however when i test it out, nothing happens.
What am i doing wrong??
Record Inventory is the name of the table, created date is the field in which the date gets entered. Technician is the list box of initals and record number is the number entered by the user.
I have a data entry form, by which a user will select a created date, their initials fro ma list box and enter a number into field. From these three pieces of info, i want to auto generate a number in the following format
DQC-R-MMDDYYYY-Initials-###. Where DQC-R is a constant that will always apear, the date is the day chosen by the user, the intials are selected from the list box, and hte ### is entered into the numbers field.
DQC-R-05262011-JF-01 for instance if i chose today, my initlas and the number 01. So far, through trial and error. i have come up with the following code in the after update event for the ### field.
Private Sub RecordNumber_AfterUpdate()
Dim RecordNumber As String
RecordID = "DQC-R-" & [Record Inventory]![CreatedDate] & "mmddyyyy" & Me.Technician & "-" & Me.RecordNubmer
End Sub
To me this looks like it should work, however when i test it out, nothing happens.
What am i doing wrong??
Record Inventory is the name of the table, created date is the field in which the date gets entered. Technician is the list box of initals and record number is the number entered by the user.