I am having a problem passing information to a query from VBA.
I can pass criteria that is simplistic e.g.
strAttending = "Attended"
SetResultAttending strAttending (this passes my information to a global variable)
And I then get a query result returned based on this criteria, no problem, with a GetResultAttending method in the query. Success.
But when I try to add more than one criteria, I can't get the code working. The query return is blank.
E.g. VBA
strAttending = """" + "Attended" + """" + " Or " + """" + "Confirmed" + """"
translates to:
"Attended" Or "Confirmed"
...in the query criteria box, in the query and this does not work. I have also tried passing it without the quotation marks without any success.
I have also tried the query criteria in another query that is identical, without passing variables, and the criteria returns the result I am looking for when I do that.
Any thoughts appreciated.
I can pass criteria that is simplistic e.g.
strAttending = "Attended"
SetResultAttending strAttending (this passes my information to a global variable)
And I then get a query result returned based on this criteria, no problem, with a GetResultAttending method in the query. Success.
But when I try to add more than one criteria, I can't get the code working. The query return is blank.
E.g. VBA
strAttending = """" + "Attended" + """" + " Or " + """" + "Confirmed" + """"
translates to:
"Attended" Or "Confirmed"
...in the query criteria box, in the query and this does not work. I have also tried passing it without the quotation marks without any success.
I have also tried the query criteria in another query that is identical, without passing variables, and the criteria returns the result I am looking for when I do that.
Any thoughts appreciated.