msg box - bbOK?

louchey

Member
Local time
Today, 22:25
Joined
Mar 24, 2003
Messages
38
Hi guys

It would be great if someone could help me with this code. Basically if the message box is triggered and the user selects "cancel" I DO NOT want the secondary bit of code to run, ie if the iso has already been issued and the user selects cancel, I want it to do exactly that! I've been playing around and I can't seem to crack it.
Cheers Louchey.

Private Sub IssueToday_Click()
If Not IsNull(Me![DateOfIssueToTOP]) Then
MsgBox "The MIV for this iso has already been issued to TOP. Are you sure you want to change this date?", vbOKCancel
End If

If [IssueToday] =True Then
[DateOfIssueToTOP] = Date
End If

If [IssueToday] =False Then
[DateOfIssueToTOP] = Null
End If
End Sub
 
Try

Private Sub IssueToday_Click()
If Not IsNull(Me![DateOfIssueToTOP]) Then
If MsgBox ("The MIV for this iso has already been issued to TOP. Are you sure you want to change this date?", vbYesNo) = vbYes then

[DateOfIssueToTOP] = Date
else

[DateOfIssueToTOP] = Null

End If
else
Msgbox "Be sure to enter a Date"
End If
End Sub
 
Thanks mate !!!
Just what I was after.

Cheers

Louchey
 
Cheers.
Good to help a local ;)
Heading down to Ocean Grove this weekend so hope the weather holds.
Dave
 

Users who are viewing this thread

Back
Top Bottom