Update Query Limits Text Characters ??

databasedonr

Registered User.
Local time
Today, 18:21
Joined
Feb 13, 2003
Messages
163
I am running an update query, using unbound controls on a form to gather the data.

One of my unbound controls is a text box that I use to write to a memo field in the table.

When I try to write more than 127 characters, however, the query fails and returns the error "Invalid Argument."

Any ideas why I am limited to 127 or less characters through an update query to a memo field?

Thanks in advance
 
Found A Solution, Still Wonder Why

I managed to get this to work by changing the query from a stored query to defining it in the code.

I went from doing this:

Dim strQueryComments As String
strQueryComments = "qryUpdateServiceComments"
DoCmd.OpenQuery strQueryComments

To doing this:

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

DoCmd.RunSQL strSQL
(with line breaks in code not included)


I am not sure why this worked and the other didn't, other than I am not trying to retrieve a stored query.

If anyone can shed some light on this, I would be grateful, otherwise, I just take my solution and run.

Thanks,

Don
 

Users who are viewing this thread

Back
Top Bottom