Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run a macro on AfterOpen Event 1

Status
Not open for further replies.

CK8

Technical User
Nov 5, 2001
15
US
How can I run a Warning Message AfterOpen on a form where I want it to first look at a check box. If the Check box is checked I want the message macro to run; if no check in the box then no Message. Message is "Please Confirm Address"

I already have the macro for the message created, but I can't make it look at the check box (named: ConAddressAlert)on the form and then run if the box is checked.

Help Thanks

CK8
 
Hi CK8!

In the Form_Current Event Procedure, put the following code:

If YourCheckBox.Value = True Then
DoCmd.RunMacro "YourMacroName"
End If

Alternatively you can use:

If YourCheckBox.Value = True Then
Call MsgBox("Your message goes here")
End If

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top