Link? Bind? VBA?

  • Thread starter Thread starter sarah
  • Start date Start date
S

sarah

Fairly new and still (always learning) and am stumped. My
tbl has 6 fields, all text. On my form I want the part
number to be selected from a combo box (I've done this
okay) and then I want the other related fields to populate
(ie: revision, part description..)automatically because
they are related to that records first field (part
number). How? I've tried setting up a text box for each
field on the form but when I select my part number from
the dropdown nothing populates in the other fields. I
looked up in Help on what I think I need but what I find
doesn't seem to fit what I need. How can I do this?
Thanks much!
 
Create a query that includes PartID, PartNum, Revision, Desc, etc, in that
order. Sort on PartNum. Use this query for the rowsource property of your
combobox. Set the BoundColumn property to 1, ColumnCount property to 6 and
Column With property to 0;1;0;0;0;0.

Create a text box on your form for Revision, Desc etc.

Put the following code in the AfterUpdate event of your combobox:
Me!NameOfRevisionTextBox = Me!NameOfCombobox.Column(2)
Me!NameOfDescTextBox = Me!NameOfCombobox.Column(3)
etc for each field
 
Back
Top