From: Aleda on
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.
From: Jeff Boyce on
Aleda

A combobox can display only one field after selection. That said, if you
wish to see more columns of information, you have a couple options:

1) you could use a query to retrieve the columns of information and in
the query concatenate the fields together into one, for display purposes.
2) you could add unbound textboxes to your form to hold the contents of
the third and fourth columns (the combobox would hold the second, but would
store the ID - the first).

NOTE: the form is for display purposes. You aren't and really don't want
to actually redundantly store all that information in the table underlying
the form.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Aleda" <Aleda(a)discussions.microsoft.com> wrote in message
news:750C37B2-6F9E-4840-A2A3-13FED57273E8(a)microsoft.com...
> 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.


From: John W. Vinson on
On Mon, 8 Mar 2010 15:52:01 -0800, Aleda <Aleda(a)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).
--

John W. Vinson [MVP]
From: Aleda on
Hi Jeff:

Thanks so much for the help. I will see if I can make it work.

All the best,
Aleda

"Jeff Boyce" wrote:

> Aleda
>
> A combobox can display only one field after selection. That said, if you
> wish to see more columns of information, you have a couple options:
>
> 1) you could use a query to retrieve the columns of information and in
> the query concatenate the fields together into one, for display purposes.
> 2) you could add unbound textboxes to your form to hold the contents of
> the third and fourth columns (the combobox would hold the second, but would
> store the ID - the first).
>
> NOTE: the form is for display purposes. You aren't and really don't want
> to actually redundantly store all that information in the table underlying
> the form.
>
> Good luck!
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
> "Aleda" <Aleda(a)discussions.microsoft.com> wrote in message
> news:750C37B2-6F9E-4840-A2A3-13FED57273E8(a)microsoft.com...
> > 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.
>
>
> .
>
From: Aleda on
Hi John:

Thanks so much for you sound advice. I will see which method I can make
happen.

All the best,
Aleda



"John W. Vinson" wrote:

> On Mon, 8 Mar 2010 15:52:01 -0800, Aleda <Aleda(a)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).
> --
>
> John W. Vinson [MVP]
> .
>