Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append a record based on the last record 2

Status
Not open for further replies.

MMSMSD

Technical User
Aug 12, 2005
93
US
Hi,
I have a table/query/form that lets me input data into a single table. I'm looking for a way to create a NEW record based on the LAST record, with the data from two fields switched. I created an Append Query that works fine in terms of the record information appended except that it adds a new record for EVERY record in the underlying table.
How can I get the Append query to look only at the LAST record in the table instead of all of them? If I set the criteria of any other field for a specific value, it WILL limit the append records, so I'm pretty sure that the query is OK. I do have an unique ID field that is an autonumber field. What I don't know is how to format the criteria for that field, asking for only the last record. Unfortunately, the ID/Autonumber field is the only one that is unique enough in the table to filter properly. Any help is appreciated. Thanks.

Michael
 
format the criteria for that field, asking for only the last record
you may try something like this:
=DMax("[ID field]", "[your Table]")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,
That did the trick. Just had to make sure I left the APPEND TO section of that field blank as well. Thanks!

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top