Hi all,
Could anyone tell me what am I doing wrong here:
================================================================
Private Sub Command93_Click()
On Error GoTo Err_Command93_Click
PROCESSUSER.Value = [Forms]![Menu]![CurrentUser]
PROCESSTIME.Value = Now()
If SMCSID.Value = 0 Then
MsgBox "You need to Enter the SMCS number beofore you can close this job", , "Error in Jobcard Closing"
ElseIf ACTIONID.Value = 0 Then
MsgBox "You need to enter the action code before you can close this job", vbCritical, "Error in Jobcard Closing"
ElseIf ACTIONID.Value < 0 Then GoTo CloseForm
CloseForm:
DoCmd.Close
Exit_Command93_Click:
Exit Sub
Err_Command93_Click:
MsgBox Err.Description
Resume Exit_Command93_Click
End If
End Sub
====================================================================
Whe the user clicks the button, it checks if there is anything inside (wanted to use is null, but doesn't wanna workk) the fields ACTIONID and SCSID. if there's nothing in smcs id, then a msgbox tells the user, if nothings in actionid, then it tells the user. If everything is filled in... wonderfull, then the form closes.
Anyone with ideas?