Can a form with drop down menus search in other forms?

N

Natasha

I am trying to design a database to where the switchboard will lead to a form
that has various drop down menus for searching purposes. Let's say that on
this form, one of the companies in the "Company Name" drop down menu is
Company A. I want for Access to pull all forms that have "Company A" in it.
So for example, I would end up with 1 record displayed out of 25. Is this
even possible?
 
J

John W. Vinson

I want for Access to pull all forms that have "Company A" in it.

Do you really mean "all forms" or do you mean "all records"? A Form is not
data, and does not have "company A" in it; the form is just a window
displaying data stored in a table.

What are your underlying tables? How are they related?
 
N

Natasha

Thank you so much for your reply. What I meant to say is that I have one
form, that has like 28 records within it. What I want to do is that when
users open up the switchboard, it will lead to a form with various drop-down
menus. Using the example below, when they click on "Company A" in the drop
down menu, I want them to be able to hit "search" and for the database to
pull all RECORDS from the form that have "Company A" in it. I'm sorry, I
should have worded the original question differently.
 
N

Natasha

I meant to say all records. I have one main form with 28 or so records
within it. Basically, what I need is that when users open up the database,
they can search within this main form for whatever they need, and for Access
to show the records that contain that item. For example, if they search for
"Company A", I want Access to show that there are 3 records that contain
"Company A", and to only show those three records. Or, if they are searching
for all companies that carry product ABC, only those that carry product ABC
can be viewed as a result of that search.
 
R

ryguy7272

Ok, I think I understand now. Check this out:
http://www.fontstuff.com/access/acctut17.htm

Here's the next page:
http://www.fontstuff.com/access/acctut17a.htm

At the bottom of THAT page, you can download a sample named
'AccessAndSQL4_2000.zip'. That's a great example of how to dynamically pass
variables to queries, using ComboBoxes.

Here's an example of how to do it using ListBoxes.
http://www.fontstuff.com/access/acctut18.htm

The advantage of using ListBoxes is that you can select multiple items (you
can only select one item in a ConmboBox).

Now, do you want to pass all records from one control or from ALL 28
controls? That's going to take a bit more work; you'll have to Dim variables
using more VBA and pass those into a Query string which you pass to the
Query. If that's what you're planning, you've got your work cut out for you.
I did the a couple months ago; not easy.

Send me an email if you want to see some samples (clearly your project will
be very different).
(e-mail address removed)
 

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