I am having a hard time trying to code around this. I have a checkbox
field in a MSAccess table called "100Fund" which is identical in
structure to other checkbox fields in the same table. I have a combo
box listing the various fields in the table for the user to select as a
table filter. If I use the following code in VB6 - where the user
selects the field "100Fund" - I get the above error:
Dim varchoice As String
varchoice = cmbFilter.Text
Adodc1.RecordSo urce = "select * from [A Table] where " & varchoice & "
= True order by LastName"
Adodc1.Refresh
All other checkbox fields work fine when selected. I appreciate that
it has to do with the field name starting with "100" but varchoice is
clearly a string variable. Using Cstr() doesn't help.
Any ideas? Thanks in advance!
Peter Tyler
field in a MSAccess table called "100Fund" which is identical in
structure to other checkbox fields in the same table. I have a combo
box listing the various fields in the table for the user to select as a
table filter. If I use the following code in VB6 - where the user
selects the field "100Fund" - I get the above error:
Dim varchoice As String
varchoice = cmbFilter.Text
Adodc1.RecordSo urce = "select * from [A Table] where " & varchoice & "
= True order by LastName"
Adodc1.Refresh
All other checkbox fields work fine when selected. I appreciate that
it has to do with the field name starting with "100" but varchoice is
clearly a string variable. Using Cstr() doesn't help.
Any ideas? Thanks in advance!
Peter Tyler
Comment