Combo Box matching to entire record

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

I have a combo box on a form that contains ID numbers and various other
fields from the table. I want to be able to select the ID number from the
combo box and have it populate other fields from the individual record. I
was thinking I needed to enter something for "after update" on the properties
for after selecting the ID number, but have not been able to get it to work.
Any suggestions?
 
Use:
Me.filter = "[id] = """ & Me.combo# & """"
Me.filteron = True

Put this in the afterupdate of the combo. Your combo# will be listed, like
combo10 or combo18.
 
Once you have selected a record in your combo box (called combo1 and having
several columns 0-5)

you can assign values from each of the columns to controls on your form
using the column property of the combo box. Column counts start with ZERO

to copy the first three columns of hte combo box into three controls on you
form (text1 text2 text3)

in the after update event of the combo box place code like this (replacing
text1, combo1 etc with your names)

me.text1=me.combo1.column(0)
me.text2=me.combo1.column(1)
me.text3=me.combo1.column(2)

Tom
 
I have a combo box on a form that contains ID numbers and various other
fields from the table. I want to be able to select the ID number from the
combo box and have it populate other fields from the individual record. I
was thinking I needed to enter something for "after update" on the properties
for after selecting the ID number, but have not been able to get it to work.
Any suggestions?

If you're trying to copy field values from one table (the combo's rowsource)
into a different table (the form's recordsource).... DON'T. Storing data
redundantly is almost always A Bad Idea.

Could you explain just what you're trying to accomplish with this?
 
I'm trying to create a form that has look up information on one side and data
entry information on the other side. I want to be able to have the combo box
on the look up side where someone could choose the ID number for the record
they are looking for and the corresponding field information would appear so
they could verify they have the correct record. Then, I want them to be able
to enter information on the data entry side for additional information
related to that record.
 
I'm trying to create a form that has look up information on one side and data
entry information on the other side. I want to be able to have the combo box
on the look up side where someone could choose the ID number for the record
they are looking for and the corresponding field information would appear so
they could verify they have the correct record. Then, I want them to be able
to enter information on the data entry side for additional information
related to that record.

Is the "additional information" in the same table? Or is it in a separate
(many side) table, which could be edited in a Subform?

It *SOUNDS* like what you want to do is to use a combo box to locate and
display an existing record. If so, use the Toolbox Combo Box Wizard to create
a combo "Use this combo to find a record". The user shouldn't need to even SEE
an ID number, unless ID numbers are in routine use out in the real world.

You can display (without storing) information from multiple columns in the
combo box by having textboxes with control sources like

=comboboxname.Column(n)

where (n) is the zero based index of the field - e.g. if the Phone is the
fifth column of the combo's row source query, use (4).
 
Back
Top