Here is what I am trying to do. I have a field that generates its own number with the following code:
Me.Job_Number.Value = Nz(DMax("[Job_Number]", "Job_Table"), 0) + 1
I need it to change it to 00000x. Can I do this in the table design? Or where else?
If it was a text string, this is how I would do it:
If Len(Me.Job_Number.Value) < 6 Then
For numberofzeroes = 1 To (6 - Len(Me.Job_Number.Value))
Me.Job_Number.Value = "0" & Me.Job_Number.Vertical
Next numberofzeroes
end if
But since it is a numeric, I am lost.
Thanks,
Nathan
Me.Job_Number.Value = Nz(DMax("[Job_Number]", "Job_Table"), 0) + 1
I need it to change it to 00000x. Can I do this in the table design? Or where else?
If it was a text string, this is how I would do it:
If Len(Me.Job_Number.Value) < 6 Then
For numberofzeroes = 1 To (6 - Len(Me.Job_Number.Value))
Me.Job_Number.Value = "0" & Me.Job_Number.Vertical
Next numberofzeroes
end if
But since it is a numeric, I am lost.
Thanks,
Nathan