I am trying to pull a report based on a wildcard and passing critering to the report. For example I want to be able to pull a report that runs a query with a field called IDTYPE. For this I want to be able to pass a criteria to the report via VBA. it is calling for the IDTYPE to be LIKE 'GID*' or 'SID*'.
The report works fine if I just enter either 'GID*' or 'SID*'. My question is can LIKE be used with multiple parameters, such as LIKE 'GID*' or 'SID*'?
When I do that it pulls up all the records not specific to GID or SID.
I am using a couple of dropdown boxes to select month and the field (IDTYPE) and Responsible group. I use a text box to type the 'SID*' etc..
The Criteria Statment it generates to pass to the report is:
InitialReveiwphase='May' and Resp_Group='ASR' and IDType Like 'SID*' (this one works fine)
will not work:
InitialReveiwphase='May' and Resp_Group='ASR' and IDType Like 'SID*' or 'GID*'
The report works fine if I just enter either 'GID*' or 'SID*'. My question is can LIKE be used with multiple parameters, such as LIKE 'GID*' or 'SID*'?
When I do that it pulls up all the records not specific to GID or SID.
I am using a couple of dropdown boxes to select month and the field (IDTYPE) and Responsible group. I use a text box to type the 'SID*' etc..
The Criteria Statment it generates to pass to the report is:
InitialReveiwphase='May' and Resp_Group='ASR' and IDType Like 'SID*' (this one works fine)
will not work:
InitialReveiwphase='May' and Resp_Group='ASR' and IDType Like 'SID*' or 'GID*'