how to popuate text boxs from a combo box

J

josepe

i want to be able to select a category from a combo box and then have
the text boxes search a table and each record matching the selection be
listed
in those boxes. If anyone could help you save me from my migrane.
Im a newbee so try and keep it simple. Can this be done using the wizards
or do i have to code something (which i havent touched yet)

thank you
 
W

Wayne Morgan

Set the Record Source for the form to the table/query you desire. In the
AfterUpdate event of the combo box, set the Filter property of the form to
the desired records and set FilterOn to True.

Example:
Me.Filter = "[FieldName]=" & Me.cboMyCombo
Me.FilterOn = True

The [FilterName] would be the name of the field that the combo box's bound
column is associated with. The syntax above assumes this value to be a
number, if it is text or a date, let me know and I'll adjust the syntax.

All records from the table will be available to the form, this will just
filter them so that the only ones you see are those which match the
selection in the combo box.
 
Top