Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / September 2007

Tip: Looking for answers? Try searching our database.

Update Query with Memo

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tonyrusin@westportshipyard.com - 20 Sep 2007 16:19 GMT
Hi Access MVPs,

I'm using Access 2003.  I have a bound form with subforms that's used
for creating and revising records.

My issue is on the side of revising existing records.  Once the user
is finished revising a record, there is a submit button that finalizes
the changes.  If the user decides to cancel, they simply close the
form without submitting and the idea is to revert the record back to
its original state.

The way I accomplish this is somewhat convoluted.  When the user
chooses to revise the record, I append the original record to an
archive table, update the live record with system changes, including a
timestamp, and open it up for user changes. At this time, the record
is updated which would happen anyways if they were to change focus to
a subform. If the user then decides to cancel after this update, I
have an update query that copies the latest version of that record
from archive table back over the canceled changes. Here is the problem
query (containing only the necessary pieces to present the issue):

UPDATE tblCCN SET tblCCN.Description = (SELECT TOP 1
tblCCNArchive.Description FROM tblCCNArchive WHERE
(((tblCCNArchive.CCN)=[Forms]![frmCCNManager]![txtCCN])) ORDER BY
tblCCNArchive.LastUpdated DESC)
WHERE (((tblCCN.CCN)=[Forms]![frmCCNManager]![CCN]));

Each field is updated using a subquery and my timestamp field is
'LastUpdated'.  The entire query works great except the
'tblCCN.Description' field in the example above is the one I run into
an error with because it is a memo field (Ref Error 3342).  Any ideas
on a work around?

Thanks in advance for any help,

- Tony
Pieter Wijnen - 20 Sep 2007 21:54 GMT
You have to use the GetChunck & AppendChunck methods of a recordset, I think
Group by etc doesn't compute for memo fields

Pieter

> Hi Access MVPs,
>
[quoted text clipped - 32 lines]
>
> - Tony
tonyrusin@westportshipyard.com - 21 Sep 2007 14:54 GMT
Can GetChunk & AppendChunk be used in the Access query builder in some
way or is my only option to create a recordset?

- Tony

On Sep 20, 1:54 pm, "Pieter Wijnen"
<it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.ple...@online.replace.with.norway>
wrote:
> You have to use the GetChunck & AppendChunck methods of a recordset, I think
> Group by etc doesn't compute for memo fields
[quoted text clipped - 43 lines]
>
> - Show quoted text -
Pieter Wijnen - 21 Sep 2007 15:01 GMT
you have to use code

Pieter

> Can GetChunk & AppendChunk be used in the Access query builder in some
> way or is my only option to create a recordset?
[quoted text clipped - 52 lines]
>>
>> - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.