Forms

dheich4321

Registered User.
Local time
Today, 14:02
Joined
Apr 21, 2003
Messages
36
I have a form that the user can select a check box or series of check boxes . Once the user hits the GO command button I want the code to determine which boxes have been selected and run the code. For example:

Box 1: Sales Report by Name
Box 2 Account Master List
Box 3 Export Data to Excel


If the user selects Box 1 and Box 3 it , when they hit GO it runs the sales report by name and exports some other data to excel.

I know how to make the command button work, but not based on values in a check box. Any help would be appreciated.
 
d,

Code:
If Me.CheckBox1 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox2 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox3 = True Then
   DoCmd.OpenReport ...
End If

Wayne
 
d,

Code:
If Me.CheckBox1 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox2 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox3 = True Then
   DoCmd.OpenReport ...
End If

Wayne
 
You could try the following code behind the command button:

IF checkbox1 = True Then Sales Report by Name
IF checkbox2 = True Then Account Master List
IF checkbox3 = True Then Export Data to Excel

HTH,

Matt.
 
d,

Code:
If Me.CheckBox1 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox2 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox3 = True Then
   DoCmd.OpenReport ...
End If

Wayne
 
Thanks for the help. It worked great. Sorry for the delay in responding.:D
 
WayneRyan said:
d,

Code:
If Me.CheckBox1 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox2 = True Then
   DoCmd.OpenReport ...
End If
If Me.CheckBox3 = True Then
   DoCmd.OpenReport ...
End If

Wayne

Trying to boost that post count Wayne?
 

Users who are viewing this thread

Back
Top Bottom