My Assistant
![]() ![]() |
|
|
Jun 22 2005, 06:07 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 168 From: South Africa |
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? |
|
|
|
Jun 22 2005, 06:17 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 7,990 From: Philippines |
Hi;
Add: or IsNull(SMCSID) HTH. |
|
|
|
Jun 22 2005, 06:26 AM
Post
#3
|
|
|
UtterAccess Addict Posts: 168 From: South Africa |
Thanks alot, that worked
|
|
|
|
Jun 22 2005, 06:30 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 7,990 From: Philippines |
(IMG:http://www.utteraccess.com/forum/style_emoticons/default/wink.gif) Glad to be of SERVICE.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 06:48 PM |