dragndrop list to text box

2

2756

i have a list box which is generated by dragging names from another list box
(tables 1&2)
I now want to select the names in table 2 into teams of 3-4 individuals,what
is the best way to do it??
 
A

Arvin Meyer [MVP]

I'd use a combo box instead of a list box and select them 1 record at a
time. It is extremely poor database design, and against Normalization rules,
to put multiple values in a field.
 
2

2756

2756 said:
i have a list box which is generated by dragging names from another list box
(tables 1&2)
I now want to select the names in table 2 into teams of 3-4 individuals,what
is the best way to do it??
thankyou for prompt reply
i have installed combo box but when i select names from the list box only the
first name is listed how do i get both first and last names
many thanks
 
J

John W. Vinson

thankyou for prompt reply
i have installed combo box but when i select names from the list box only the
first name is listed how do i get both first and last names
many thanks

Your table of names should (MUST!) have a primary key value - a PersonID,
which might be Autonumber, an assigned numeric ID, or a unique text field. It
should not be the person's name, since names are not unique.

Your combo box's bound column should be this field, not the name (first *or*
last *or* full name), and the value should be stored in a table field of
appropriate datatype (Long Integer if the people table's primary key is an
Autonumber). The user need not *see* the number value, but it should be the
"glue" linking the tables together.
 
2

2756

thanks John but i still need help? I have a table with members list No as a
primary key with two cols first and last names.i created a combo box using
this table and col count of 3 bound col 1 but it only shows first name again?
sorry you must have a lot of patience for us learners!thanks again
[quoted text clipped - 4 lines]
first name is listed how do i get both first and last names
many thanks

Your table of names should (MUST!) have a primary key value - a PersonID,
which might be Autonumber, an assigned numeric ID, or a unique text field. It
should not be the person's name, since names are not unique.

Your combo box's bound column should be this field, not the name (first *or*
last *or* full name), and the value should be stored in a table field of
appropriate datatype (Long Integer if the people table's primary key is an
Autonumber). The user need not *see* the number value, but it should be the
"glue" linking the tables together.
 
J

John W. Vinson

thanks John but i still need help? I have a table with members list No as a
primary key with two cols first and last names.i created a combo box using
this table and col count of 3 bound col 1 but it only shows first name again?
sorry you must have a lot of patience for us learners!thanks again

You need a calculated field in a Query as the rowsource of the combo. Let's
say you have fields PersonID, LastName and FirstName, and you want the names
to appear as "Jones, Janet", last name first with a comma.

Create a new Query based on the names table. Select PersonID as the first
field; in the second column Field cell type

[LastName] & ", " & [FirstName]

Sort ascending by this field. Use column count of 2; make the bound column 1
(the ID); and set the ColumnWidths property to

0";1.5"

so that the ID field is not displayed.
 
2

2756 via AccessMonster.com

thanks John,it works well!now i can move on with the rest of my database
ideas ,if you ever come to Australia, this is somebody who will make you
welcome
rgds dennis
thanks John but i still need help? I have a table with members list No as a
primary key with two cols first and last names.i created a combo box using
this table and col count of 3 bound col 1 but it only shows first name again?
sorry you must have a lot of patience for us learners!thanks again

You need a calculated field in a Query as the rowsource of the combo. Let's
say you have fields PersonID, LastName and FirstName, and you want the names
to appear as "Jones, Janet", last name first with a comma.

Create a new Query based on the names table. Select PersonID as the first
field; in the second column Field cell type

[LastName] & ", " & [FirstName]

Sort ascending by this field. Use column count of 2; make the bound column 1
(the ID); and set the ColumnWidths property to

0";1.5"

so that the ID field is not displayed.
 

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