Changing a text box to a combo box ... oops. Can you help?

C

Chris v.

I have a main form with a text box displaying a group name (The associated
groupID is the link to the subform showing attendance.) Using the record
selector at the bottom of the main form works well, and the link to the
subform is fine. However, when I change the text box to a combo box, I can't
get it to display the correct text, and the link to the subform does not work
correctly. These are the setting I have made using Access 2007: For the
field: column count 2; column widths .25", 1"; List width 1.5"; bound column
is "2" since groupID is 1 and group_name is second, and locked is "No". On
opening the form, groupID (not the group name.) is shown. Selecting the combo
box drops down both columns, but selecting does not change what is displayed.
Also, using the record selector at the bottom of the main form works
correctly, changing the sub form, but the control still only shows the
group_ID as it changes. What have I missed?
 
C

Chris v.

So the bound column should be "1" (I guess the count starts at "0" as group
name is the second column.) but I still can't get the process of selecting
from the drop down list to polulate the combo box - no selection means the
subform does not change. However, the record selector at the bottom of the
page still works correctly. I'm getting closer, but still am doing something
wrong. Any ideas?
Thanks in advance.
 
B

bcap

No, the count starts at 1. Assuming that you are storing the GroupID in the
record, not the name, then clearly the bound column should be 1. It
identifies the field in the table to which the combo box is bound, it has
nothing to do with which field(s) are displayed.

I'm guessing that you really want the ColumnWidths property set to "0;", and
the ListWidth to "Auto". This will cause the combo box to display the name
and not the ID.
 
C

Chris v.

Thanks for the reply. Let me try again, from the top this time. I want to
create a form that has ONLY 1 control and then a subform linked to that
control. Should the mainform's control be "Unbound" as I don't want it to
write to a table, but merely lookup via a combo box "groups" (think classes)
thereby filtering the attendance records that appear on the subform? The
subform will display attendance records, using the group_id field as the link
between the main form and the sub form. The subform is based on a query so it
displays data from several tables (clients, attendance and group) and the
link between the subform and the mainform works fine. I can't seem to get the
text box on the main form to convert to a working combo box. Do you have any
ideas? Should I start creating this form from the betinning again?
 
B

Bob Quintal

Thanks for the reply. Let me try again, from the top this time. I
want to create a form that has ONLY 1 control and then a subform
linked to that control. Should the mainform's control be "Unbound"
as I don't want it to write to a table, but merely lookup via a
combo box "groups" (think classes) thereby filtering the
attendance records that appear on the subform? The subform will
display attendance records, using the group_id field as the link
between the main form and the sub form. The subform is based on a
query so it displays data from several tables (clients, attendance
and group) and the link between the subform and the mainform works
fine. I can't seem to get the text box on the main form to convert
to a working combo box. Do you have any ideas? Should I start
creating this form from the betinning again?

You would be better off to delete the existing textbox from the form,
and drag a new combobox from the toolbar after making sure that the
Wizard is enabled.

The wizard will help you set up the combobox to do what you want.
 

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