D
dl
I have a statement that BruceM was kind enough to supply, and it was working
beautifully until a recent change.
What it does is mimic the auto number function and makes sure the 2nd to
last number is never a zero....or at least it used to.
Private Sub AssignBarcode_Click()
If Right(DMax("barcodeID", "barcodes"), 2) = 9 Then
Me.barcodeID = Format(Left(DMax("barcodeID", "barcodes"), 5) + 2,
"00000") & "0"
Else
Me.barcodeID = Format(Left(DMax("barcodeID", "barcodes"), 5) +
1, "00000") & "0"
End If
End Sub
When I have this running in the forms current event it works fine. However,
I need to be able to copy a record and adjust the ending zero that it
appends. So, in order to do that, per Bruce's guidence; I've tied this
function to a command button to "assign" the number. The only problem is
that now it doesn't add 2 when the number reaches 9, any idea why?
Thank you!!!
dl
beautifully until a recent change.
What it does is mimic the auto number function and makes sure the 2nd to
last number is never a zero....or at least it used to.
Private Sub AssignBarcode_Click()
If Right(DMax("barcodeID", "barcodes"), 2) = 9 Then
Me.barcodeID = Format(Left(DMax("barcodeID", "barcodes"), 5) + 2,
"00000") & "0"
Else
Me.barcodeID = Format(Left(DMax("barcodeID", "barcodes"), 5) +
1, "00000") & "0"
End If
End Sub
When I have this running in the forms current event it works fine. However,
I need to be able to copy a record and adjust the ending zero that it
appends. So, in order to do that, per Bruce's guidence; I've tied this
function to a command button to "assign" the number. The only problem is
that now it doesn't add 2 when the number reaches 9, any idea why?
Thank you!!!
dl