where clause in recordsource

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Back
Top