Update Query Fails

D

Don Reid

Greetings -- I have an update query that I am trying to
run.

The query collects data from a text box on a form and
should update it to a memo field.

The query works fine until I reach 128 characters -- then
it returns an Invalid Argument error message and does not
update the field.

Any suggestions would be gratefully received.
 
J

Jeff Boyce

Don

No first-hand experience with this, but I do recall seeing a 128 character
issue with memo fields. Have you checked the MS Knowledge Base on the
topic? Have you been to Google.com and searched on the topic?

Good luck

Jeff Boyce
<Access MVP>
 
D

Don Reid

Yes, I've been all over the Web and the MS-KB -- posted
the question on 2 or 3 other Access forums as well.

The query only fails when I run it based on the form, ie.
when I use the form for input. When I enter the data
directly in the query, it's fine, but when I enter it in
the text box and call the text box contents to the query,
it fails with an "Invalid Argument".
 
D

Don Reid

Just in case anyone is interested:

I stopped trying to run this as a stored query, ie. I
stopped trying to run the query like this:



And ran it instead like this:

Dim strSQL As String
strSQL = "UPDATE tblService SET tblService.Comments
= """ _
& [Forms]![frmUpdateServiceData]!
[txtNewComments] & """ WHERE (tblService.ServiceID) = " _
& [Forms]![frmViewAll]![ServiceID] & ";"

DoCmd.RunSQL strSQL

I still don't know why, but it works.
Don
 

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