473,669 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(CS tr([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 3717
mi********@gmai l.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(C Str([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$(1 3) & 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
6888
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 type, and the properties is set to Unicode Compression = Yes) How do I fix this problem?
4
7531
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 can I schwitch back to Hyperlink via VBA because its boring doing it manually often (I import the table each week for doing updates). When I do it manually the hyperlink works well. Thanks in advance.
6
2695
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 a simple INSERT INTO sql command. Anyone know a way around this? Sample strSQL = "INSERT INTO tblListings " & _ "(Dir, Street, City, State, " & _ "AFirst, Price, ALast, MainPhoto, Summary, Details,
0
2764
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 underlying table (in a memo field) in html format, as one big block of text. The memo field is called (I named it before I realized that I needed to separate title from text).
2
3587
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 DISTINCT and GROUPBY will fix this problem (as discussed in other threads in this group), but I need to limit the query results to unique values, which is what DISTINCT does for me. Any suggestions? Thanks, Jacob
2
14393
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 Failure". The field in question is set up as a Long Integer in the target table. When creating values, the Append Query performs a "group by" on this field, and, although it leaves the data format blank, only offers date-related options for...
2
12204
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 has no value in it. Query: Field: Zipcode Table: tblMemberInfo Update to: Replace(,"""","")
1
2482
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 point. I have now spent the last 2 days scouring the net for a resolution to my problem. I have a DB with MANY tables, but a transfer of 1 memo field between 2 in particular (tbl_Proposal to tbl_Job) is where my problem is. Nothing is working. The...
3
9381
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 tables. Some fields have datatype Memo and in these fields my data is not getting inserted/updated. My queries contains local tables & dbf tables (Both). I try simple insert query which insert data into one memo field in foxpro editor and sql...
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8895
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2797
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.