Create Form for selcting Multiple values

R

Rag742

I want to create a form where I can select multiple values. I have
Table “Chemicals” that contain 10 chemicals say C1 to C10. I have
another Table “ROOM”. I have setup relationship between “Room” and
“Chemical”.
How do I create a RoomForm with Chemical list so I can select multiple
chemical in the room???
Please help.
Is this possible, as we are creating multiple records from this
form??

Thank you
Rag742
 
M

Mr B

This sounds very much like one of those situations where you need a
many-to-many relationship for your data rather than a one-to-many relation
ship.

If there can be multiple chemicals in multiple rooms then you will need to
create another table that will link chemicals to rooms multiple times.

Assuming that your chemicals table uses an auto number field as an ID for
each chemical and that your rooms table does the same, then you would simply
create a table with the two ID fields from each of the existing tables. Then
when you want to link a chemical to a room you simply write a record in the
Linking table that includes the ID from the Chemical table and the ID from
the Rooms table.

As for making multiple selections, I would suggest that you would use list
boxes set to allow muitiple selectlions. Then you will need VBA code to
process the selected items from list.
 
R

Rag742

This sounds very much like one of those situations where you need a
many-to-many relationship for your data rather than a one-to-many relation
ship.

If there can be multiple chemicals in multiple rooms then you will need to
create another table that will link chemicals to rooms multiple times.

Assuming that your chemicals table uses an auto number field as an ID for
each chemical and that your rooms table does the same, then you would simply
create a table with the two ID fields from each of the existing tables. Then
when you want to link a chemical to a room you simply write a record in the
Linking table that includes the ID from the Chemical table and the ID from
the Rooms table.

As for making multiple selections, I would suggest that you would use list
boxes set to allow muitiple selectlions. Then you will need VBA code to
process the selected items from list.

--
HTH

Mr B
askdoctoraccess dot com

Thank you. foollowed your advise, i still have problem.
" As for making multiple selections, I would suggest that you would
use list
boxes set to allow muitiple selectlions."

How do I make Multiple Selection from teh list. It only allows one
selection. I tried using "shift" ,"Ctrl", nothing works for multiple
selection.


"Then you will need VBA code to
process the selected items from list."

What does this Mean.I need to write the code??







"
 

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