Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

2 combo boxes 1 report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 12 Oct 2005 21:40 GMT
Hi,

I have a form with 2 combo boxes (A and B) used to pass searched information
from a query to a common report. ComboA searches for Customer_Name or ComboB
for licence plate#. For ComboA I've Command1 to trigger the report while I
use Command2 for ComboB (both combos use Customer_ID to pass on the info).

Well, I would like to use only one Comand button for either Combo box. So,
I'd
imagine I'd need an IIF statement which detects info in either combo box.
The common Command would be something like: IIF ComboA has data OR ComboB
has data, then open report.

Can someone please translate my thoughts into coding?

TIA

Mike
Joan Wild - 12 Oct 2005 23:34 GMT
DoCmd.OpenReport "YourReport", acViewPreview, , "Customer_ID = " & Me!ComboA
& " Or Customer_ID = " & Me!ComboB

That assumes that Customer_ID is a number.  You'd also have to ensure that
only one of the comboboxes is used (or maybe not, if you want to see two
customers)

Signature

Joan Wild
Microsoft Access MVP

> Hi,
>
[quoted text clipped - 14 lines]
>
> Mike
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.