I'm trying to get a dlookup to work with three criteria. if I remove one (any one) it works. The minute I insert the third back into the script (vb) it won't pull up the data. My dlookup is below:
Code:
ctl.ControlSource = DLookup("ControlSource", "UFO_CIL_selectedFieldListArchiveT", "FieldNumber = " & i & " and EquipmentNumber = '" & Forms!UFO_OperatorFrameF!BlankPageF.Form!SelectedEquipmentTxt & "' and shift = 'all'")
I'm also getting an error that makes no sense to me:
Syntax error (missing operator) in query expression 'FieldNumber = 1 and EquipmentNumber = '107309' and shift = 'all'
I've been banging my head against the monitor long enough I need to phone a friend. Can anyone tell me what I'm doing wrong?
Thanks,
DD