How to display combo box selection results, etc...

G

Guest

I have a form named “Usersâ€.
On the Users form, there is a subform named “Interestsâ€.
The Interests subform contains a combo box named Combo6.
The combo box allows the user to choose interests from the list one at a
time and then displays them in their own field continuously. I guess the
Combo box would be considered a continuous combo box (?).

My tables are:

Users
Interests
Users&Interests
Cities

My table structure is:

In the Users table, the UserID is linked to the UserID in the
Users&Interests table.
The InterestID from the Interest table is linked to the InterestID in the
Users& Interests table.

I am not sure how to link the Cities table to the other ones, or if I even
need to link the table to anything.
I don’t know what field that I would have to add to link it to one of the
other tables (if I need to link it to something, which table(s) should it be
and what fields should I join together?).

What I am trying to accomplish is this:

When the user selects their interests from the combo box, I need to have a
command button on the form that will take those selections and match them up
with “keywords†in the Cities descriptions and display the results on another
form (or the same one if possible).

For example, if I’m the user and I choose art, museums, and fine wine as my
interests, I would press the command button that says “Show Places of
Interest†and New York, Paris or San Francisco would come up as my possible
places to visit. (Somewhere in the description of these cities, I would find
the “keywords†of art, museums and wine).

Can anyone provide help on how to do this?

Thanks.
 
G

Guest

Hi Ann,

It sounds like you have a many-to-many (M:N) relationship between Cities and
Interests, ie.:

A city can have many interesting places to visit (1:M)
and
Interesting places to visit can be found in many cities (1:M)

Try creating a new linking table, CityInterests, which contains CityID and
InterestID as foreign keys. Relationships are then created with the
corresponding primary keys.

Your challenge would then be to search the CityInterests table for matching
records when a user clicks on the command button.

If my answer has helped you, please answer yes to the question that reads
"Did this post answer the question?" at the bottom of the message thread.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________


:

I have a form named “Usersâ€.
On the Users form, there is a subform named “Interestsâ€.
The Interests subform contains a combo box named Combo6.
The combo box allows the user to choose interests from the list one at a
time and then displays them in their own field continuously. I guess the
Combo box would be considered a continuous combo box (?).

My tables are:

Users
Interests
Users&Interests
Cities

My table structure is:

In the Users table, the UserID is linked to the UserID in the
Users&Interests table.
The InterestID from the Interest table is linked to the InterestID in the
Users& Interests table.

I am not sure how to link the Cities table to the other ones, or if I even
need to link the table to anything.
I don’t know what field that I would have to add to link it to one of the
other tables (if I need to link it to something, which table(s) should it be
and what fields should I join together?).

What I am trying to accomplish is this:

When the user selects their interests from the combo box, I need to have a
command button on the form that will take those selections and match them up
with “keywords†in the Cities descriptions and display the results on another
form (or the same one if possible).

For example, if I’m the user and I choose art, museums, and fine wine as my
interests, I would press the command button that says “Show Places of
Interest†and New York, Paris or San Francisco would come up as my possible
places to visit. (Somewhere in the description of these cities, I would find
the “keywords†of art, museums and wine).

Can anyone provide help on how to do this?

Thanks.
 

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