I checked the type of qdef parameter using
MsgBox qdef.Parameters("@Explanation").Type
It displays 10 which is type Text. I also checked the Access help for type Text -
"A field data type. Text fields can contain up to 255 characters or the number of characters specified by the Size property of the Field object, whichever is less. If the Size property of the text field is set to 0, the text field can hold up to 255 characters of data."
I also tried assigning -
qdef.Parameters("@Explanation").Value = Text1
and
qdef.Parameters("@Explanation").Value = RS!fld2
where text1 is string type and fld2 is memo field.
The result is the same.
qdef.Parameters("@Explanation").Type is 10 for string size of upto 255 chars. If size is more then 255, it gives the error as mentioned by jal.
It show that Memo or String type is not supported by qdef property parameters. It supports only text type. Memo or String type gets converted to Text type if the size is up to 255. Beyond that it generates error.
This seems to apply to qdef parameters only. I have not yet seen other cases.
MsgBox qdef.Parameters("@Explanation").Type
It displays 10 which is type Text. I also checked the Access help for type Text -
"A field data type. Text fields can contain up to 255 characters or the number of characters specified by the Size property of the Field object, whichever is less. If the Size property of the text field is set to 0, the text field can hold up to 255 characters of data."
I also tried assigning -
qdef.Parameters("@Explanation").Value = Text1
and
qdef.Parameters("@Explanation").Value = RS!fld2
where text1 is string type and fld2 is memo field.
The result is the same.
qdef.Parameters("@Explanation").Type is 10 for string size of upto 255 chars. If size is more then 255, it gives the error as mentioned by jal.
It show that Memo or String type is not supported by qdef property parameters. It supports only text type. Memo or String type gets converted to Text type if the size is up to 255. Beyond that it generates error.
This seems to apply to qdef parameters only. I have not yet seen other cases.