large string in vba

P

Patrick

Hi,
I try to use a large string in vba code
The string hold a "where" statement for a query.
The maximum charaters I can put into it is 251,
but the help file says the string datatype can hold up to 2^32 characters,

Somebody know what I'm doing wrong ?

Regards,
Patrick
 
M

Mikael Sorensen

You probably have to break the string into several substrings, using the _ char. Each substring should not contain more than 251 characters. Like this

str = str1 &
str2 &
str

Regards
Mikae
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top