Multi column select in ComboBox(s)

D

DocBrown

I have a DB where I'm managing a group of volunteers. There are two tables
relevant for this discussion, a Volunteer table that stores details about
them, and a Login table where I'll enter the times they login and out. I'm
looking for help on the approach to code the LogIn form to allow
semi-automated data entry and calculation that will store data in both the
logIn and Volunteer tables. Ideally, I'd like to allow the user to select the
volunteer first and last name from a dropdown. Or is there some other way to
find the appropriate volunteer record.

The relevant fields for Volunteer TBL are:
Name: Type:
VolID (AutoNumber)
FirstName Text
LastName Text
TotalHours Date/Time
(other fields....)


For LogIn TBL:
RecID (AutoNumber)
VolID Number
Date Date/Time
TimeIn Date/Time
TimeOut Date/Time

The login Form will display the following fields:

Date
FirstName
LastName
TimeIn
TimeOut
Hours (Calculated from timeout - timein)

The two tables are related on the VolID field.

The record for the volunteer tbl will have been created first (I have a form
for doing that.), if not the volunteer's login data can't be entered.

To create an entry in the Login tbl, my first attempt To retrieve the
appropriate volunteer record was to create a 3 column combobox with a query
that retrieves the VolID, firstname, lastname from volunteer tbl. This allows
me to select the firstname, lastname from the dropdown (column 0 wdth=0). But
when I select an item, the combobox only displays the firstname. Why isn't
the last name also displayed? Is there a way to display both?

Is there a different approach I should take? I hope this is enough info.

Thanks,
John S.
 
E

Evi

The way to get both FirstName and surname displayed is to click RowSource in
your combo box's properties.
A query grid will open.
Click on the first name field, go to Insert, Column so that you have a new
column to the LEFT of the first name field and type in the top row of that
column

FullName: ([FirstName] + " ") & [SurName]

(replacing my field names with the real ones)

Evi
 
D

DocBrown

Evi,

Thanks for the quick reply!! It works perfectly!

John

Evi said:
The way to get both FirstName and surname displayed is to click RowSource in
your combo box's properties.
A query grid will open.
Click on the first name field, go to Insert, Column so that you have a new
column to the LEFT of the first name field and type in the top row of that
column

FullName: ([FirstName] + " ") & [SurName]

(replacing my field names with the real ones)

Evi

DocBrown said:
I have a DB where I'm managing a group of volunteers. There are two tables
relevant for this discussion, a Volunteer table that stores details about
them, and a Login table where I'll enter the times they login and out. I'm
looking for help on the approach to code the LogIn form to allow
semi-automated data entry and calculation that will store data in both the
logIn and Volunteer tables. Ideally, I'd like to allow the user to select the
volunteer first and last name from a dropdown. Or is there some other way to
find the appropriate volunteer record.

The relevant fields for Volunteer TBL are:
Name: Type:
VolID (AutoNumber)
FirstName Text
LastName Text
TotalHours Date/Time
(other fields....)


For LogIn TBL:
RecID (AutoNumber)
VolID Number
Date Date/Time
TimeIn Date/Time
TimeOut Date/Time

The login Form will display the following fields:

Date
FirstName
LastName
TimeIn
TimeOut
Hours (Calculated from timeout - timein)

The two tables are related on the VolID field.

The record for the volunteer tbl will have been created first (I have a form
for doing that.), if not the volunteer's login data can't be entered.

To create an entry in the Login tbl, my first attempt To retrieve the
appropriate volunteer record was to create a 3 column combobox with a query
that retrieves the VolID, firstname, lastname from volunteer tbl. This allows
me to select the firstname, lastname from the dropdown (column 0 wdth=0). But
when I select an item, the combobox only displays the firstname. Why isn't
the last name also displayed? Is there a way to display both?

Is there a different approach I should take? I hope this is enough info.

Thanks,
John S.
 

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