By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,572 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,572 IT Pros & Developers. It's quick & easy.

Type conversion failure in update query using memo field

P: n/a
Hello
Trying to update a memo field in an update query using the Replace
function, and am getting a type conversion error. Here is my parameter:

CStr(Replace(CStr([text1]),"$",Chr$(13) & Chr$(10)))

This fails. However, this also fails:

CStr([text1])

I have tried to set the query parameters for the Text1 field, but when
I run it, it asks me for the value of the field.

Oct 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
mi********@gmail.com wrote:
>Hello
Trying to update a memo field in an update query using the Replace
function, and am getting a type conversion error. Here is my parameter:

CStr(Replace(CStr([text1]),"$",Chr$(13) & Chr$(10)))

This fails. However, this also fails:

CStr([text1])

I have tried to set the query parameters for the Text1 field, but when
I run it, it asks me for the value of the field.
The outermost CStr is not neccessary, and you need to guard for Null
values:

Replace(CStr(Nz([text1], "")),"$",Chr$(13) & Chr$(10))

HTH
Matthias Kläy
--
www.kcc.ch
Oct 24 '06 #2

P: n/a
That worked! Thanks Matthias

Oct 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.