character limit to updating memo field from form

G

Guest

I'm trying to run the update statement:

UPDATE tblServiceDeskLog
SET statusdesc = 'Closed',
DateTimeResolved = [Forms]![frm_ClosingDetailsFromFindCall]![datetime],
resolution = [Forms]![frm_ClosingDetailsFromFindCall]![resolution]
WHERE ID=[Forms]![frm_ClosingDetailsFromFindCall]![ID];

from a macro as Open Query and it won't allow the resolution to be more than
127 characters.

Running the same update direct from the query SQL window does allow the
update if it is more than 127 characters.

Does anyone know how to solve this? I've looked at formatting on the form
and there isn't anything set.
 
T

Tom Ellison

Dear AJ:

This form, "frm_ClosingDetailsFromFindCall" - is it open at the moment the
query is run? Are all the references to controls spelled exactly?

Try this query:

SELECT TOP 1
[Forms]![frm_ClosingDetailsFromFindCall]![datetime] AS P1,
[Forms]![frm_ClosingDetailsFromFindCall]![resolution] AS P2,
[Forms]![frm_ClosingDetailsFromFindCall]![ID] AS P3
FROM tblServiceDeskLog

This will test your references as written. Be sure you use copy/paste to
put them together. You want every typo in the original!

Are they working? Do they give the values chosen on the form as expected?

A simple technique of writing a query to see what your form controls are
returning is often very instructive. I recommend to everyone who uses
controls this way to use this technique whenever it is applicable. Working
in ignorance of an error you have made can be very costly in time. Seeing
what is wrong is "priceless." (If you don't beleive me, just watch the TV
commercials!)

One note: The table referenced is a "dummy". It can be any table, but must
have at least one row for this to work.

Maybe this should be a "tip" on somebody's web site? What do you think?

Tom Ellison


AJB said:
Forgot to say that I get an Invalid Argument error - I'm new to this!!

AJB said:
I'm trying to run the update statement:

UPDATE tblServiceDeskLog
SET statusdesc = 'Closed',
DateTimeResolved = [Forms]![frm_ClosingDetailsFromFindCall]![datetime],
resolution = [Forms]![frm_ClosingDetailsFromFindCall]![resolution]
WHERE ID=[Forms]![frm_ClosingDetailsFromFindCall]![ID];

from a macro as Open Query and it won't allow the resolution to be more
than
127 characters.

Running the same update direct from the query SQL window does allow the
update if it is more than 127 characters.

Does anyone know how to solve this? I've looked at formatting on the
form
and there isn't anything set.
 

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