Kalechibki
Programmer
As part of a query, I need to be able to select only part of a field for a certain record to see if it fits in with a query (I'm working with a database someone else created, and the powers that be are used to the layout so they don't want me to change it).
So, the only way that I know how to do the query would be the following, which I've got to work in a stand alone query:
SELECT Count([SurveyResults].[Ques1]) As Expr1
FROM SurveyResults
WHERE ((InStr(1,[Ques1],'Colleague',1)>0));
However, when I try to flip over into Visual Basic to do the same (because of the sheer volume of queries, I feel that it would be impractical to try and leave all of them as stand alone queries to be called), using:
DoCmd.RunSQL ("SELECT Count([SurveyResults].[Ques1]) FROM SurveyResults WHERE ((InStr(1,[Ques1],'Colleague',1)>0));"
the query doesn't work! Anyone have any insight into why it wouldn't work? I'm using Access 2000 and VB 6.0
Brian
So, the only way that I know how to do the query would be the following, which I've got to work in a stand alone query:
SELECT Count([SurveyResults].[Ques1]) As Expr1
FROM SurveyResults
WHERE ((InStr(1,[Ques1],'Colleague',1)>0));
However, when I try to flip over into Visual Basic to do the same (because of the sheer volume of queries, I feel that it would be impractical to try and leave all of them as stand alone queries to be called), using:
DoCmd.RunSQL ("SELECT Count([SurveyResults].[Ques1]) FROM SurveyResults WHERE ((InStr(1,[Ques1],'Colleague',1)>0));"
the query doesn't work! Anyone have any insight into why it wouldn't work? I'm using Access 2000 and VB 6.0
Brian