You *might* have missed the point here. Both Jeff and John are giving
you
the SAME advice from different perspectives; it's not a choice of methods
in
the most fundamental sense.
Your student table should be designed like this. If it is not, then your
first step will be to correct the table design, and then come back to
work
on the combo box for selecting students and for displaying their names in
report
tblStudent
=======
StudentID --the primary key, a unique identifier for each student,
commonly
created using the Autonumber in Access
StudentFirstName
StudentLastName
StudentDOB (if appropriate)
StudentGender (if appropriate in your workflow)
etc. as appropriate to your workflow
tblPayment
========
PaymentID --the primary key, a unique identifier for each payment,
commonly
created using the Autonumber in Access
StudentID --the foreign key, points back to the student table and
uniquely
links each student to one or more payment records in the payment table
PaymentAmount
PaymentReason
PaymentDate
etc. as appropriate to your workflow
When used as the rowsource for a combo box, the proper approach is to
bind
the primary key--StudentID--to the combo box. That value is the one you
store in the payments table. That value, the StudentID, is the ONLY value
you store in the payments table, as shown above. It is stored in the
payments table as a foreign key.
HTH
George
Hi John:
Thanks so much for you sound advice. I will see which method I can make
happen.
All the best,
Aleda
:
On Mon, 8 Mar 2010 15:52:01 -0800, Aleda
<Aleda@discussions.microsoft.com>
wrote:
Is there a way to change a combo box that has 3 columns of
information
(last
name, first name and address) so that all of the information appears
on
the
record?
I created a form, that in the Name Field, when you click on the
arrow, a
combo box lets you select the name, showing the last name, first name
and
address. However, I did not realise that on the record, only the last
name
appears.
This is a student database and I am trying to track payments for
certain
items. I think I have to create another form.
Any help would be greatly appreciated.
First off... don't name a field Name. Name is a reserved word (a Form
has
a
Name property, a textbox has a Name property...).
Secondly, don't store data redundantly. If you're trying to copy the
full
name
and address from the table of Students into a payments table - DON'T!
The
student's name should exist only in the Students table; that table
should
have
a unique StudentID, and only that field should be put into the table
of
payments.
You can *display* the full name in the combo box by basing the combo
on a
query such as
SELECT StudentID, [LastName] & ", " & [Firstname] AS Fullname,
[Address]
FROM
Students ORDER BY LastName, FirstName;
You can also put textboxes on the form with control sources such as
=comboboxname.Column(n)
where n is the zero based index of the field in the combo - e.g. if
the
address is in the third column use (2).