Removing/Ignoring Query Criteria

Montez659

Well-known Member
Joined
May 4, 2005
Messages
918
I have a query that will pull a report based on a repID that is chosen from a combobox. I added an option to show the report for all reps, but I am having trouble with the query because right now in the query I have criteria in the primaryRep column of
Code:
[Forms]![frm_ChooseRep]![txtRep]
The reason it is txtRep is because I tried putting the value of the combobox into txtRep, and when the checkbox for all reps was selected, it would change txtRep to something else (not sure, this is where I am stuck). I tried changing txtRep to be '>0' but that didn't work.

Any suggestions on how to do this? If I could default the combobox to "All Reps" instead of having to have a checkbox, that would be swell too. The combobox pulls from a query, and here is the string:
Code:
SELECT [Active Contacts Extended].ID, [Active Contacts Extended].[Contact Name] FROM [Active Contacts Extended] ORDER BY [Active Contacts Extended].[Contact Name];

Thanks in advance!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Alan, thanks for the response. I will check into that video, but I realized that I could do what I wanted with the filtering via a simple DoCmd line in VBA as opposed to the Access Macro and query criteria that I had.

Thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top