Search combo box, fill form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form in which I have a combo box perform a query and list only records I want to have available in that perticular form. I want to choose form this combo box and have my form be filled with the information from the chosen record. I can't seem to accomplish this. Can you help?
 
The usual practice is to have the combo's RowSource SQL
bring back all the columns that you wish to use on the form
then to code its AfterUpdate eventhandler to populate the
other controls on the Form. You will need to change the
column count to match the number of columns returned and to
set the column widths to suit your taste (usually all but
the first column is set to 0). To reference the data in
the other columns you use the combo's Column (zero-based)
collection. So the code in the AfrterUpdate eventhandler
would look something like

txtBoxA.Value = combo1.Column(1)
txtBoxB.Value = combo2.Column(2)
etc

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I have a form in which I have a combo box perform a query
and list only records I want to have available in that
perticular form. I want to choose form this combo box and
have my form be filled with the information from the chosen
record. I can't seem to accomplish this. Can you help?
 
Back
Top