where clause in recordsource

C

Carlee

Hello there

I have a form that has a revolving recordsource depending what is selected
in the first screen. For example if Canada is clicked in the list box, the
recordsource for the next screen is only those clients in canada. How can i
use the same query to have no where clause. I have an All selection in my
list box, but can't seem to get the query to show all records

Any suggestions?
 
A

Albert D. Kallal

Just make sure the 2nd form query has NO parameters or prompts...

Then, simply use the "where" clause option when you open the form.

dim strWhere as string

strWhere = "Country = '" & me.lstCountry & "'"

docmd.OpenForm "my second form",,,strWhere
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top