Drop-Down Boxes

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

Guest

I would like to do something a little more complicated this time.

I have a list of businesses. Each business has an office in several cities
in America.

I would like to set it up so that future users of the database can use a
drop-down box (meaning you see only the name of the first business in the
box) to locate the business they want. Then they use a drop-down box below
it (set up the same way) to select the city for that particular business.
Then they would see a card with the info for that business in that particular
city.

You see, the second box would adjust itself according to the data in the
first. If they chose "Fillmore Publishing," the second list would give them
the choices of Anchorage, Phoenix, New York. However, if they chose
"Thompson Glassworks," the second list would give them a choice of Seattle,
Los Angeles and Orlando. Whatever cities apply to that particular business.

Can anyone help? Thank you! Eric
 
Eric

Look up "Cascading Comboboxes" at mvps.org/access, or at Google.com.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Great! I've created the cascading combo boxes. Now I'd like to arrange it
so that one the item in the second box has been chosen, the entire record
shows up on the form. I'm trying various things but to no avail. No matter
what I do, the first record in the database just sits there on the form,
totally unrelated to the Combo Boxes. Can someone point the way? Eric
 
Eric

A suggestion ... when you change the topic, start a new thread. That way,
you get more eyes on your issue.

You need a way to tell Access to find/load the record that corresponds to
the selection(s) you've made. One way is to filter the recordset the form
is bound to. Another is to based the form on the single record represented
by the choices.

To do the latter, change the query on which you base the form to include, as
a selection criterion for the ID field, a reference pointing to the ID of
the value selected in the combo box (the last one in the "cascade".

Then, in the AfterUpdate event of that last combobox in the cascade, use
something like:

Me.Requery

to force the form to rerun the query on which it is based.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Jeff,

I certainly will start a new topic going forward.

Is there a page on the Microsoft site you can point me to that illustrates
all of this?

Eric
 
Forms or FormsCoding would be the newgroups.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top