TimHudspith
asked on
Dlookup syntax in ControlSource property of a textbox
I can't seem to get the syntax right when using a Dlookup as the control source of a text box on an Access form. It references the value in a combobox on the same form.
=Dlookup("Field2", "MyTable", "Field1 = '" & Me.cmbName.value & "'")
This works in VBA but not when placed in the ControlSource property of textbox when the form is in design view.
=Dlookup("Field2", "MyTable", "Field1 = '" & Me.cmbName.value & "'")
This works in VBA but not when placed in the ControlSource property of textbox when the form is in design view.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.