How to display Combo box selections, etc...

G

Guest

Please bear with me while I try to explain what I need...

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).

Any ideas on how I can make this happen? Thanks in advance for the help.

Ann
 
G

Guest

Hi Ann.
Think about the rrelations you have to rebuild.
our Users seem to live in a City. But I think thats not the point. Your
interests are in a relation to cities - not 1:1 but n:m, right? The interest
SOCCER can take place in lots of cities. All of those cities may have a
connection with ther interests.

So you'll need:
Table interests
Table cities
and (same way you have resolved the Relation betw. users and interests)
Table Interests&Cities (to break down the n:m)

Your User may select some interests out of a select field or something. By
doing that you should get new entries inside the USER&INTEREST Table. After
that you are (WITHOUT ANY BUTTONS!) able to look up all Cities that have a
relation to the selected interests of this user in the Table
"Interests&Cities". You can just show them!

Start out building the tables. Define good names for your primar and foreign
Key columns (same names there). Then go to Relation designer and define the
relations. All of the rest will be easy.

Good Luck!
Markus Pöhler
netpoint-edv gmbh
Germany
 
G

Guest

Hi Markus - Thanks for responding. I hate to be so confused, but I'm new to
all of this. In my new table (Interests and Cities), what fields should I
have and which tables do I link the fields from Interests and Cities to?

Also, how can I just show the results without having any buttons?

Thanks again for your help!

Ann
 
G

Guest

Hi Ann, sorry for the period gone.

You should define relations. Create an numeric auto-value ID fieldfor each
table. Call it sth like "CityID", "UserID"...

Then refer to this datarow from the other tables. e.g. create another field
CityID in your User Table. There you can ENTER the CityID of the City entry
in the Cities Table the user lives in.

Do do this more easy without knowing the ID values you can use Drop Down
fields. Go to Table Users in design mode. select the CityID field. Below
select LOOKUP FIELD TAB (I dont know the exac englich title). There select
Dropdown, select a table (the Cities Table). Thats all. Open User Table in
Data mode and there you have a dropdown (WITHOUT A BUTTON ;)

If you create a form now you should also get a dropdown there ba default I
think.

Markus Pöhler
Software Developer
netpoint-edv gmbh
Germany
 

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