Message box on cancel code? How?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guys, I have a tick box which when the user ticks I want to display a msg
box asking the user to confirm they have entered all details on a form
correctly. I have the following code which works to some extent.

This displays the msg box but if the user clicks cancel the box is still
ticked, how do I force the box to untick if the user selects cancel?

Private Sub Printed_Click()
MsgBox "Are Details Complete?", vbOKCancel

Me.Requery
End Sub
 
Richard,

If vbYes = MsgBox("Are all the details complete?", vbYesNo +
vbQuestion,"Confirm details") Then
'The user selected YES
Else
'The user selected No
End If

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Thanks Graham that worked perfectly.

I love it when a plan comes together! :)
This forum is superb.
 
Back
Top