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 / Database Design / April 2005

Tip: Looking for answers? Try searching our database.

How to retrieve record that was appended last?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joshua - 25 Apr 2005 10:42 GMT
Hello,
I have a table populated by an append query. The append query appends those
records from the source table whose 'model-Nr' field has changed. I want my
append query to compare the record in the destination table with the same
'index key' field and that which was appended most recently.
this is because the append query compares all the records with the same  
'index key' field and then appends so many records.
whereas, I want to compare the record appended most recently in the
destination table and the corresponding record in the source table.

both the tables are related through the 'Index key' field.
relation type is' include all the records from the source table and include
only those records from the destinaiton table that are equal'.
index key field is unique for every record.
Jeff Boyce - 25 Apr 2005 13:02 GMT
Joshua

"appended most recently" requires knowing when a record was appended.  Do
you have a date/time field you put Now() into when you append records?

Signature

Good luck

Jeff Boyce
<Access MVP>

> Hello,
>  I have a table populated by an append query. The append query appends those
[quoted text clipped - 10 lines]
> only those records from the destinaiton table that are equal'.
> index key field is unique for every record.
Joshua - 25 Apr 2005 15:19 GMT
Hi Jeff,
I do have a field with a date() function..the changes do not require a now()
function in my case.
still, I am not sure how to comapre them.
can u give a sample code or something like that?
Thanks
Joshua

> Joshua
>
[quoted text clipped - 18 lines]
> > only those records from the destinaiton table that are equal'.
> > index key field is unique for every record.
Rick Brandt - 25 Apr 2005 15:31 GMT
> Hi Jeff,
> I do have a field with a date() function..the changes do not require
> a now() function in my case.

If you append more than one record a day then you DO need to use Now()
instead of Date().  There is no intrinsic property that keeps track of which
records were inserted first or last.  You have to have a field in the table
that will hold that information.  Then its'; simply a matter of doing a
SELECT TOP 1... query sorting in descending order on that field.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

 
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.