Access question...how to...

C

Carol

I have a database that contains a table named "Hobbies"
and another table that contains "Cities". The Hobbies
table already contains standard hobbies. The cities
table contains city names. What I am looking to do is
create a form that allows a user to pick one or more
hobbies and based upon those hobbies, the form will
display specific cities that they could visit. For
example, if they are interested in art, Paris or New York
would display based upon them picking Art in the hobbies
drop-down list.

My questions are these:

1.) How do I create a form that allows a user to pick
more than one hobby and have all of the hobby names
displayed after they choose them from the list so that
they can see what they chose?

2.) How do I associate the "keywords" like Art to the
city names like "Paris or New York"?

3.) How do I create the query that would run to
display the results on the form?

4.) I guess the most important question is what are
the steps that I need to take to make this happen and in
what order?

Thanks so much for your help!
 
J

John W. Vinson/MVP

You need A THIRD TABLE. You have a many (cities) to many
(hobbies) relationship; whenever you have such a
relationship, you need a table to contain the fact
that "Art" and "Paris" are in fact related. This table
should have a field linked to the Primary Key of the
Cities table (which should not be the city name - while
Paris, Texas is a nice place, you won't find the same
resources there as in Paris, France!); and a field linked
to the Primary Key of the Hobbies table.

You might need additional fields as well, such as perhaps
a memo field allowing a paragraph describing in what way
Paris is a good place for Art.
My questions are these:

1.) How do I create a form that allows a user to pick
more than one hobby and have all of the hobby names
displayed after they choose them from the list so that
they can see what they chose?

Use a Subform based on this third table; it could have a
Combo Box based on the Hobbies table. Make it a continuous
Subform and they'll be able to see the list.
2.) How do I associate the "keywords" like Art to the
city names like "Paris or New York"?

As above.
3.) How do I create the query that would run to
display the results on the form?

No query is needed; the main form would be based on the
Cities table, the subform on the new table.
4.) I guess the most important question is what are
the steps that I need to take to make this happen and in
what order?

I hope the suggestion above answers this!

John W. Vinson/MVP
 
Top