button wizard

  • Thread starter enrico via AccessMonster.com
  • Start date
E

enrico via AccessMonster.com

how do you put a condition on a button? like if you click "yes" the button
will perform an action and if "no" it will not perform nothing
 
J

Jeanette Cunningham

Hi enrico,
you can use a message box.

Private Sub BtnName_Click()
If vbYes = Msgbox("Do you wish to continue?", vbYesNO, "Continue?") Then
DoCmd.OpenForm "NameOfForm"
Else
End If
End Sub


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top