ta*****@yahoo.com (Therese A. Sorna) wrote in message news:<be**************************@posting.google. com>...
pi********@hotmail.com (Pieter Linden) wrote in message news:<bf**************************@posting.google. com>...
Are you planning on saving the selections somewhere? (in a table)? If
so, use a subform. If you're just using these for query criteria or
something, there's code on www.mvps.org/access that has code that does
that.
I am not really familiar with subforms, but that sounds like it is
what I need. How would I do that? I don't want to have multiple
records to account for the multiple selections.
Thanks,
T
If you create two tables, say tblPerson and tblSelections
CREATE TABLE tblPerson(
PersonID AutoNumber PRIMARY KEY,
FirstName Text(20) NOT NULL,
LastName Text(20) NOT NULL);
CREATE TABLE tblSelections(
SelectionID Long NOT NULL,
PersonID Long NOT NULL,
PRIMARY KEY (SelectionID, PersonID));
You'd create a subform based on tblSelections and make SelectionID a
combobox and as the RowSource of the combobox, create a query (the
wizard will just about walk you through the whole thing)...
SELECT tblChoices.ChoiceID, tblChoices.ChoiceText
FROM tblChoices
ORDER BY tblChoices.ChoiceText;
Then you'd have 2 columns in your combobox, and the first column
bound. To hide the ChoiceID in the interface, set the ColumnWidths
property to 0;1 or something... the first column width = 0 to hide it.
Then you're pretty much off to the races. You can enter as many
UNIQUE values in the subform as you want... (Unique meaning the
combination of (PersonID and SelectionID) has to be unique.
HTH.
Pieter