I have a form with a ID number field (txtproperty_ID) which the user can manually type in. When the user types the ID number I want to populate 3 other fields in the form with data from a related table.
e.g. user types "1234" and "field_address1 = 1 anywhere street", "field_address2 = Glasgow"
The table I have has all the ID Numbers and address details in it.
I am trying to do this on the afterupdate event of the ID num field and so far I have something like:
Me.Address1 = ([t_properties]![address_1]) WHERE ([t_properties]![property_id] = Me.txtproperty_ID)
I know the WHERE statement is wrong (just put it in for the sake of the example). This is what I need to fix, I know I could do it with a subform but would rather do it with code.
Any suggestions please?
e.g. user types "1234" and "field_address1 = 1 anywhere street", "field_address2 = Glasgow"
The table I have has all the ID Numbers and address details in it.
I am trying to do this on the afterupdate event of the ID num field and so far I have something like:
Me.Address1 = ([t_properties]![address_1]) WHERE ([t_properties]![property_id] = Me.txtproperty_ID)
I know the WHERE statement is wrong (just put it in for the sake of the example). This is what I need to fix, I know I could do it with a subform but would rather do it with code.
Any suggestions please?