Search Criteria to the passthrough query in access

Jovial

Registered User.
Local time
Today, 05:18
Joined
Jan 21, 2015
Messages
29
Hello Everyone,
I have a passthrough query where I have to pass the search criteria as "IN" using access VBA. All the search criteria are stored in the field "Code" in the table "Area" in access as:
table -Area.PNG
I can pass each code value in the passthrough query as a loop and execute the passthrough query but i don't want to do that as there are many Code present in the actual table and don't want to hit the server multiple times.
So I decided to concatenate all rows into one row and pass that to the query using VBA. I use method describe in http://allenbrowne.com/func-concat.html
table-Area after Allen.PNG
This method gave me the results back but it is truncating the Code as it cross the 255 limit and I am not able to figure out how to prevent it.

Please give me some suggestions. My main goal is to pass the search criteria in the pass through query as "IN" clause.

Thank you,
 
Did you set the field type for the Code field to memo?
 

Users who are viewing this thread

Back
Top Bottom