How to ADD <ALL> to a COMBO BOX ?

dj_mix

Registered User.
Local time
Today, 16:03
Joined
Aug 30, 2006
Messages
39
How do I add <ALL> to the top of my combo box ?

<ALL> = * (ALL)

this is my current Row Source

SELECT DISTINCT [State Aid Projects].COUNTY FROM [State Aid Projects];

this is for a form, with a command button to view report..

query looks at the combobox for the data
 
Last edited:
Hi, I usually set it up, so that if nothing is selected 'IS NULL' then I run with no parameter. This is usually when I have a DoCmd statement running a report on a button. Hope this helps.
 
dj_mix said:
How do I add <ALL> to the top of my combo box ?

<ALL> = * (ALL)

this is my current Row Source

SELECT DISTINCT [State Aid Projects].COUNTY
FROM [State Aid Projects];

this is for a form, with a command button to view report..

query looks at the combobox for the data

Your Row Source is okay. Just set up your query for the Report to include ALL the data, then filter for what you want.

Code:
SELECT State Aid Projects.*

FROM State Aid Projects

WHERE (([County]=Forms!YourFormName!YourComboBoxName Or Forms!YourFormName!YourComboBoxName Is Null)=True)

ORDER BY (whatever order you wanted the data in);

The query behind what I described would look something like the above. In this case, if you selected a specific county, the report would return only that county, but if you didn't choose a county (left the combo blank) it would list ALL the counties.
 

Users who are viewing this thread

Back
Top Bottom