Base your other form on a query that contains a City field and State field.
Put the following in the criteria of the City field:
Forms!NameOfSearchForm!City
Put the following in the criteria of the State field:
Forms!NameOfSearchForm!State
Put the following code in the Click event of the button on the search form:
DoCmd.OpenForm "NameOfOtherForm"
DoCmd.Close acForm, "NameOfSearchForm"
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com www.pcdatasheet.com
Over 1050 users have come from the newsgroups trusting me and requesting
help.
My fees are very reasonable.
"Mindy" <ma************@yahoo.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Hey,
on the form, I set up a "Search" button, which is a command button.
After a user select the city and state on the form , and hit the
"search" button, I hope another form will show up containing members
where the city and state matches what the user pick up in the previous
form. But following the wizard of command button, I only could set up
one criterea, either compare city or state. Does any one know how to do
this?
The idea is so straight forward, but without knowledge of VBA , it is
so hard for me. Thanks.
Mindy