G
Guest
I have a combo box and a text box in a subform. When I select a test_name
from the combo box I want the test_id to be placed in a text box on the same
form. The test id gets stored in the main table. I can select a test_name
that uses a query based on a table of test names. However, the test_id field
is not updating when selection is made. Can anyone tell me what I'm doing
wrong?
Code for combo box:
Private Sub Test_Name_BeforeUpdate(Cancel As Integer)
' Update Test_Id To controls based on value selected in Test_Name combo box.
Me!Test_Id = Me!Test_Name.Column(1)
End Sub
Code for the text box:
Private Sub Test_Id_BeforeUpdate(Cancel As Integer)
' Update Test_Name To controls based on value selected in Test_Id combo box.
Me!Test_Name = Me!Test_Id.Column(1)
End Sub
thanks.
from the combo box I want the test_id to be placed in a text box on the same
form. The test id gets stored in the main table. I can select a test_name
that uses a query based on a table of test names. However, the test_id field
is not updating when selection is made. Can anyone tell me what I'm doing
wrong?
Code for combo box:
Private Sub Test_Name_BeforeUpdate(Cancel As Integer)
' Update Test_Id To controls based on value selected in Test_Name combo box.
Me!Test_Id = Me!Test_Name.Column(1)
End Sub
Code for the text box:
Private Sub Test_Id_BeforeUpdate(Cancel As Integer)
' Update Test_Name To controls based on value selected in Test_Id combo box.
Me!Test_Name = Me!Test_Id.Column(1)
End Sub
thanks.