A
AHopper
When a number like (20 digits) 77801474347002273657 is
entered into a text box "LabelOnePack" by using the
following in the AfterUpdate event, I get the correct
data I want to enter in two other text boxes.
If Nz(Me.LabelOnePack) >= 1 Then
Dim RegNo As String
RegNo = Nz(Me.LabelOnePack)
Me.RegisteredLabel = CStr(Left("" & RegNo & "", 19))
Me.CheckDigit = CStr(Right("" & RegNo & "", 1))
End If
I get the following result:
"RegisteredLabel" 7780147434700227365
"CheckDigit" 7
The Fields in the table where the data is stored are set
to text so they will allow letters.
How can I verify that the entry is 20 digits with no
letters?
If it is not correct I want to send a message, undo the
update and exit the sub.
Thank you for your help.
Allan
entered into a text box "LabelOnePack" by using the
following in the AfterUpdate event, I get the correct
data I want to enter in two other text boxes.
If Nz(Me.LabelOnePack) >= 1 Then
Dim RegNo As String
RegNo = Nz(Me.LabelOnePack)
Me.RegisteredLabel = CStr(Left("" & RegNo & "", 19))
Me.CheckDigit = CStr(Right("" & RegNo & "", 1))
End If
I get the following result:
"RegisteredLabel" 7780147434700227365
"CheckDigit" 7
The Fields in the table where the data is stored are set
to text so they will allow letters.
How can I verify that the entry is 20 digits with no
letters?
If it is not correct I want to send a message, undo the
update and exit the sub.
Thank you for your help.
Allan