Hi everyone,
sorry to be a pain again, but I seem to be running around in circles......
I need a sequential number in my DB which should display in the report as a 3 digit number, i.e. 001.
Searching this site has given me the code which will increase the number each time a form is submitted and this works well, but the number is displayed as a single digit.
I have messed with formats and masks but my knowledge level is sufficient to be dangerous but not enough to be effective
Ideally I would like a 3 digit number in the table, but I would settle on it just being displayed on the report if it is not possible on the table
thank you
sorry to be a pain again, but I seem to be running around in circles......
I need a sequential number in my DB which should display in the report as a 3 digit number, i.e. 001.
Searching this site has given me the code which will increase the number each time a form is submitted and this works well, but the number is displayed as a single digit.
I have messed with formats and masks but my knowledge level is sufficient to be dangerous but not enough to be effective
Ideally I would like a 3 digit number in the table, but I would settle on it just being displayed on the report if it is not possible on the table
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.[Report_ID]) Then
Me.[Report_ID] = Nz(DMax("[Report_ID]", "tbl_Report"), 0) + 1
End If
End Sub
thank you