Good Day,
I am attempting to set the controlsource of a textbox on a form to a dlookup function but it isn't working. The field just appears blank. When I check the code in the immediate window I get compile error: variable not yet created in this context.
I am relatively new to Access but I've been trying to figure this out on my own with no luck so far.
Any help or guidance is appreciated.
I am attempting to set the controlsource of a textbox on a form to a dlookup function but it isn't working. The field just appears blank. When I check the code in the immediate window I get compile error: variable not yet created in this context.
I am relatively new to Access but I've been trying to figure this out on my own with no luck so far.
Code:
Me.txtPreviousActionPlan1.ControlSource = _
Nz(DLookup("Q3Milestone1", _
"TBL_ActionPlan", _
"SingleName =" & "'" & [SingleName] & "'"), _
"")
Comment