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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get a report to check for what is in a combo box?

Status
Not open for further replies.

itbri

IS-IT--Management
May 5, 2005
1
US
In the following form, I have a combo box with 2 options, 'Open' or 'Closed'.

How can I get a report to only on items that are 'open' or 'closed', but not both?

Thanks
 
itbri
Assuming that you have a command button that runs the report, with a DoCmd line in the code behind the button...add a Where clause to that line. Try something such as the following

DoCmd.OpenReport "YourReportName", acViewPreview, , "FieldThatIsBoundToYourComboBoxName = Forms!YourFormName!YourComboBoxName = "Open""

Tom
 
itbri
Sorry, I didn't type that properly. It should be...

DoCmd.OpenReport "YourReportName", acViewPreview, , "Forms!YourFormName!YourComboBoxName = "Open""

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top