(Access 03)
I have an form with a Combo box with a list of customers. On the After-update event of the combo box I want to assign a textbox the value of the companies #1 contact. (Contacts are stored in a seperate table).
Ive tried creating a DLookup even on after-update, but I keep getting an error cant assign a value to a control without having focus.
Ive tried to add the field to the query which is the forms record source, but it jsut creates problems which is pretty complicated.Code:txtContact.text = DLookUp("[Name]","TBLContact","[COMPANYID] = Forms![FRMSalesOrder]![txtBillCustID] AND [ContactNo] = 1")
Is there an alternative??
cheers


Reply With Quote