I'm trying to populate a text box with a Dlookup based on a combobox value.
Form containing the combobox
Unique ID in the table
Field wanted in the textbox
This is the code I've tried but didn't work:
Set rst2 = CurrentDb.OpenRecordset("tblEquipment")
Forms("frmInspection").Form.Controls("txtHS") = _
DLookup(.Fields("HS"), "tblEquipment", Forms("frmInspection").Form.cboEquipement = _