Here is my code...
Private Sub Authorize_Click()
On Error GoTo Err_Authorize_Click
Dim Field As String
Dim Check As Boolean
Field = Me!AuthorizationNumber
Check = IsNull(Field)
If (Check = True) Then
Randomize
Me!AuthorizationNumber = Int(RND * 1000000000)
Else
MsgBox "This Ticket Has Already Been Authorized"
GoTo Exit_Authorize_Click
End If
Exit_Authorize_Click:
Exit Sub
Err_Authorize_Click:
MsgBox Err.Description
Resume Exit_Authorize_Click
End Sub
If there is a value in the AuthorizationNumber Field then the msgbox displays if there is no value I get The Invalid Use of Null Error. What am I doing wrong? Any help would be greatly appreciated.
Private Sub Authorize_Click()
On Error GoTo Err_Authorize_Click
Dim Field As String
Dim Check As Boolean
Field = Me!AuthorizationNumber
Check = IsNull(Field)
If (Check = True) Then
Randomize
Me!AuthorizationNumber = Int(RND * 1000000000)
Else
MsgBox "This Ticket Has Already Been Authorized"
GoTo Exit_Authorize_Click
End If
Exit_Authorize_Click:
Exit Sub
Err_Authorize_Click:
MsgBox Err.Description
Resume Exit_Authorize_Click
End Sub
If there is a value in the AuthorizationNumber Field then the msgbox displays if there is no value I get The Invalid Use of Null Error. What am I doing wrong? Any help would be greatly appreciated.