Query parameter

S

Souris

Dim qd As DAO.QueryDef

Set qd = EISDb.QueryDefs("MYQUERY")

qd.Parameters("pComments").Value = CStr(Replace(Me!
txtComments.Value, Chr(34), Chr(34) & Chr(34)))

qd.Execute

I have above code which failed when the comment has 874 characters and
double quotes, single quote and number sign on it.

Are there any limitations to pass paramter to a query?

Your information is great appreciated,
 
M

Michel Walsh

Number of characters for a parameter in a parameter query: 255


After all, a parameter, and a computed expression, is like a field, also
limited to 255 chars.



Vanderghast, Access MVP
 
S

Souris

Thanks for the information,

docmd.runSQL wroks.
It seems that It is better to use RunSQL for a long string to store in memo
field.

Please let me know if I am wrong,
 

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