msg box - remove check box or keep check box in form

J

JamiOrtung

I need to perform a couple of different things:

I have a "yes/no" option built into a form. When the "yes" option is
clicked, a MsgBox pops up asking if this what they meant to do. On selection
of "ok" in MsgBox, check box on form should remain checked; on selection of
"cancel" in MsgBox, check box on form should be unchecked and message box
closed (end of action).

If "yes" option in the MsgBox is checked, I need to have "yes" control
clicked on two other forms in the database OR have "yes" box selected in two
different tables that link to these controls in the forms.

Can anyone help?

Thanks!
 
M

Mark Andrews

If the two other forms are open and related to this form you could do it
differently than using sql to update tables
otherwise here's a guess:

if msgbox("is this what you meant to do?",vbYesNo,"Confirm") = vbNo then
Me.checkNo = 0
else
sql = "write your update sql here"
DoCmd.SetWarnings False
DoCmd.RunSQL(sql)
end if

Exit_mySub
DoCmd.SetWarnings True
Exit Sub
Err_mySub
normal error code
 

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