I have a combo box (cboFacilityType) on a form (underlying table and field: tblDraws_Details.FacilityType) and after I update cboFacilityType I need to update another field in the same record (tblDraws_Details.ID_facility) but I need to update to the same value where tblFacilityCommitments.FacilityType=tblDraws_Details.FacilityType)
I basically I need to update [tblDraws_Details.ID_facility] where [tblFacilityCommitments.FacilityType = tblDraws_Details.FacilityType
I think it would look something like this (but it it doesnt update to anything) :
Private Sub cboFacilityType_AfterUpdate()
Me.ID_facility = DLookup("FacilityType", "tblFacility_Commitments", "FacilityType=" & [FacilityType].Value & "")
' ^^^possibly facilitytype.column(1)-didnt work tho
Possibly InsertInto would be another way to do this instead of dlookup because I believe Dlookup slows the db.