Command buttons, forms, autocomplete, etc

M

Mushi

Hi all,

I have 2 tables, one with source #, source name, the other table has
source #, state, zip. I made a query that joined these two tables
together to make one big one using source # as the common field.

I then have 3 copies of this same query, one for source name, one for
state, and for zip. Then for the queries, I set the criteria to
[Enter State] etc for the matching query.

Finally I have a form with command button for state, zip, and source
name, that will open the appropriate query and ask for the state, zip,
or name.

I believe there has to be a way to accomplish this without multiple
queries. How is this done? Also I would like the box to autocomplete
when asking for the input, maybe somehow having the command button
open a combo box? I dont want the info entered on main form page.

Any help is greatly appreciated.
 
B

Beetle

Rather than having three separate parameter queries, you could use
unbound combo boxes on a form then filter your recordset based on
what was selected in the combo boxes. There is an example of this
type of form at this link;

http://allenbrowne.com/ser-62.html
 
J

John Spencer

Since the three different fields are not likely to overlap you could just
search all three on the same criteria.

WHERE State = [Find What?]
Or ZIP = [Find What?]
OR [Source Name] = [Find What?]

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

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