In your query of table2 show both fields that you want on the form. Then in the attributes of the combo box make sure the you have 2 columns. You can have the second column have a length of 0", this will hide the second column when the combo box has focus.
Create an event procedure for when the combo box is clicked. Then use the following examble:
Field2 (of Table 1) = field2.column(1) (This is the combo box)
Query1 SELECT Table2.Field1, Table2.Field2
FROM Table2;
Form FieldA FieldB FieldC FieldD
(FieldC is a Combo Box using Query1 Table2.Field1)
I want Field2 of Query1 to go to Table1.FieldD as soon as I select from Combo Box.
[Event Procedure]
Private Sub C_BeforeUpdate(Cancel As Integer)
FieldD = Field2.Column(2)
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.