Displaying all of the fields for a record chosen in a combo box

E

Ed3

I run projects for retail customers. I have a form that allows me to see all
of the phases of the project at once. I cannot figure out how to display the
entire record of the particular unit on which I am working. Subforms haven't
worked as I need to choose from a master list each time. Any help on this
would be greatly appreciated.

Ed Owen
 
J

John W. Vinson

I run projects for retail customers. I have a form that allows me to see all
of the phases of the project at once. I cannot figure out how to display the
entire record of the particular unit on which I am working. Subforms haven't
worked as I need to choose from a master list each time. Any help on this
would be greatly appreciated.

Ed Owen

You'll need to explain a bit more.

You can see all the phases - but you can't see all the phases???

Please post some more information about the structure of your tables, the
recordsource of the form and its subforms, and the nature of the problem.

John W. Vinson [MVP]
 
E

Ed3

I can step through the individual records on the master form. I have a combo
box that allows me to pick which individual unit we are working on. The
first field is visible in the box, and the record is maintained as is should
be by the form, but I can't figure out how to see more than the first field
after the box closes. I need to be able to view company name, unit #,
address, phone, etc. All of this information is stored in the record but
does not display. I hope that makes it a little more clear.
 
J

John W. Vinson

I can step through the individual records on the master form. I have a combo
box that allows me to pick which individual unit we are working on. The
first field is visible in the box, and the record is maintained as is should
be by the form, but I can't figure out how to see more than the first field
after the box closes. I need to be able to view company name, unit #,
address, phone, etc. All of this information is stored in the record but
does not display. I hope that makes it a little more clear.

If the form is bound to a table different from the combo's row source, and you
want to see other fields from that rowsource... include all the fields that
you want to see in the combo's row source query; be sure the ColumnCount is
equal to the number of fields. You can hide the fields from the combo dropdown
by setting the width of each such column to 0 in the ColumnWidths property.

Then put textboxes on the form with control sources like

=comboboxname.Column(n)

where n is the zero based index of the field that you want to see.
 
E

E3

John,

You were right on the money. Now I need to get the data to change without
having to click on each field or switch records, but this is a great step
forwrd. Thanks.
 
J

John W. Vinson

You were right on the money. Now I need to get the data to change without
having to click on each field or switch records,

Um?

If the textboxes are unbound and reference the combo, then selecting a record
from the combo should change all of the textboxes. Doesn't it?
 
E

Ed3

They do change, but only if I tab to them, click on them with the mouse or
move to the next record. I used this on another form and all of the text
boxes change immediately. Very odd.
 
J

John W. Vinson

They do change, but only if I tab to them, click on them with the mouse or
move to the next record. I used this on another form and all of the text
boxes change immediately. Very odd.

Odd indeed, and doesn't fit with my experience! You could try putting a
Repaint in the AfterUpdate event of the combo box, but it really shouldn't be
necessary.
 

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