Combo box question on a form

J

Jeff

I'm modifying a client's existing form. The form show a single event
with many members attending. There is a many-to-many relationship
between Events and Members and there is a relationship record between
the two tables.

Event
EventID
Event Name

tlbAttendees
EventID
MemberID
Comments
Members

MemberID
Last Name
First Name

I've created a query qryAttendees that includes all the fields in
tlbAttendees, plus the first and last name from MemberID. I then
created a subform sfrmAttendees and displayed MemberID (as a combo
box), First and Last Name. So far, so good.

I tied it to my form, and it brings up the proper records. However,
when I click on the combo box, it displays the values for the EventID,
not MemberID.

Can someone tell me what I'm doing wrong here??

Thanks

Jeff

Thanks.
 
M

Marshall Barton

Jeff said:
I'm modifying a client's existing form. The form show a single event
with many members attending. There is a many-to-many relationship
between Events and Members and there is a relationship record between
the two tables.

Event
EventID
Event Name

tlbAttendees
EventID
MemberID
Comments
Members

MemberID
Last Name
First Name

I've created a query qryAttendees that includes all the fields in
tlbAttendees, plus the first and last name from MemberID. I then
created a subform sfrmAttendees and displayed MemberID (as a combo
box), First and Last Name. So far, so good.

I tied it to my form, and it brings up the proper records. However,
when I click on the combo box, it displays the values for the EventID,
not MemberID.


I sounds like the combo box's row source is set to the wrong
table and/or bound to the wrong field. If the combo box is
a LinkChild field, maybe the corresponding LinkMaster is set
to the wrong field??
 
J

Jeff

I sounds like the combo box's row source is set to the wrong
table and/or bound to the wrong field.  If the combo box is
a LinkChild field, maybe the corresponding LinkMaster is set
to the wrong field??

It is set to the qryAttendees and the control source is the MemberID.
It is not a LinkChild field.

Could the order of fields in qryAttendees or the fact that I don't use
all the fields in the query have something to do with this?

Jeff
 
M

Marshall Barton

Jeff said:
It is set to the qryAttendees and the control source is the MemberID.
It is not a LinkChild field.

Could the order of fields in qryAttendees or the fact that I don't use
all the fields in the query have something to do with this?


The order of the fields should be reflected in the
BoundColumn and ColumnWidths properties.

The thing I don't understand is how the EventID field can
get there, unless you put it in the row source query for
some undisclosed reason and the above properties are set
incorrectly.
 

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

Similar Threads

Change to form 3
Combo box updates on a form 1
Listbox question 1
Listbox questions 2
Changing values 1
Loop within Loop 4
Populate form from list box selection 4
Adding New Record with Time Stamp 1

Top