D
Don K
I need to change the controlsource of a textbox depending on the value of a
combo box. On the AfterUpdate event of the combobox I have the following
statements:
Select Case cboboxvalue
Case 1
me.recordsource = "query1"
me.txtboxname.controlsource =
"=Dlookup("queryname","fieldname","criteria")"
Case 2
etc
End Select
The criteria is a number and is coded as:
"intID = 1"
I know the issue is most likely with the quotation marks, but I have not
been able to delimit them without either getting an error, or having part of
the string become a comments line because of a single quote.
How should the controlsource line be coded?
Thanks,
combo box. On the AfterUpdate event of the combobox I have the following
statements:
Select Case cboboxvalue
Case 1
me.recordsource = "query1"
me.txtboxname.controlsource =
"=Dlookup("queryname","fieldname","criteria")"
Case 2
etc
End Select
The criteria is a number and is coded as:
"intID = 1"
I know the issue is most likely with the quotation marks, but I have not
been able to delimit them without either getting an error, or having part of
the string become a comments line because of a single quote.
How should the controlsource line be coded?
Thanks,