473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Type conversion failure in update query using memo field

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
2 3703
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
That worked! Thanks Matthias

Oct 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jacky11 | last post by:
When combining in a query a field with MEMO Data type and a field with TEXT Data type like this Caption: ! & ! The query will not Display/Export more than 256 characters. The field is a Memo...
4
by: Andreas Meffert | last post by:
Hello, How can I change the Type of a field in a table from Memo to hyperlink? I import a table from Oracle to Access 2003. After that, the field type of some hyperlink-fields is "Memo". How...
6
by: Matt | last post by:
I'm having difficulty with trying to update a Access memo field through an SQL statement where the value I'm trying to pass is longer than 255 characters. The field is being truncated. I'm using...
0
by: Phil C. | last post by:
Hi, I'm using Access 2000. I have a Select Query that uses the MID function to separate the actual text of articles from the title of the articles. The articles are enterd into the...
2
by: jacoballen | last post by:
I have a query that combines the results of three related tables. The memo fields are truncated to 255 characters, but I need all the information in them. I'm aware that removing code such as...
2
by: john in fl | last post by:
Hello Everyone, I have an Append Query that worked fine in Access97 but now fails to work in Access 2000. The error that occurs is that it puts null values in a field due to a "Type Conversion...
2
by: Reedsp | last post by:
OS: MS XP Access version: 2003 SP2 I am trying to use an update query to replace quote marks with nothing. In essence, I'm removing quote marks. I get a error message when a field is empty or...
1
thewesties
by: thewesties | last post by:
Could somebody please help me before I dump a gallon of water on my pc! I am very happy to have come across this site on the internet. TheScripts has helped me through so many issues to this...
3
by: Kunal Desale | last post by:
Hi, How to insert/update data in foxpro table field having datatype MEMO using Linked Server? I have written sql insert queries in which i have used linked server to insert data into foxpro...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.