Code:
Dim info As String
info = “Select [CN] & “ - “ & [AF] As Info From [_Data] Where supname = ‘“ & Me.cboTest.Column(0) & ‘“;”
I would debug.print your 'info' value I bet it doesn't work.
Code:
info = "SELECT [CN] & "" - "" & [AF] As INFO FROM [_Data] WHERE Supname = '" & me.cbotest.column(0) & "'"
This is assuming your table is actually named _DATA and the field is actually named SUPNAME
If you are enclosing " marks within a string you have to double them up "" which is what I did around your hyphen.
At the end of your statement you are inverting your " and ' marks as well which you can also solve by putting "" marks anywhere there is a ' mark
So your original statement (when I put in spaces to make it more visible is
Code:
...SUPNAME = ' " & me.cbotest.column(0) & ' ".....
the single quote on the right is on the wrong side of the " mark
Code:
...SUPNAME = ' " & me.cbotest.column(0) & " '.....