Query via form

beware1

New member
Local time
Today, 19:03
Joined
Jun 26, 2003
Messages
7
Ok I know, may be it's easy but i just can't figure out how to do this

I have a form, on which there is a control (eg. Combobox1) in which I chose one topic (eg. Month number)

In the query I make a reference on this combobox
Forms![Combobox1]

It's Ok when I work with one topic but if I can't to select all of them.

The idea of Iif(Forms![Combobox1]=all;'*';Forms![Combobox1]) doesn't work.

I don't want to make another query for the case of "all topics".

Please help, I already get nuts about it. Thanks anyway.
 
You need to change the way you are assigning the recordsource of the form. Right now you have it assigned to a query (perhaps there is a way to still use the query but I can't think of how).

I've attached a simple example database with two forms. The first one frmEmployees1 does not have an "All" choice. The second one, frmEmployees2, does. Take a look at the code and how it assigns the record source of the form. Hopefully you can adapt the ideas to your form.
 
Oops. Realized I forgot to attach the database!
 

Attachments

Users who are viewing this thread

Back
Top Bottom