Link to home
Start Free TrialLog in
Avatar of TimHudspith
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.
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial