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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make Table Query for Last Record Entered

Status
Not open for further replies.

kdowney

IS-IT--Management
Oct 9, 2002
8
0
0
US
I need to export data to an MS Word mail merge format. I'm assuming I need a make table query; the data from which I will then export. Because of the nature of the data entry (sometimes one record entered in a day, sometimes more), this needs to be done one entry at a time.

I can create a query that asks for the unique field criteria to be input, but is there a way to write a query that automatically pulls the data from the last record entered?

I would appreciate any help.

Thanks!
 
If there is an ID on the table (a date would work, too) try to build a query on a query. First query (q1) would look like:

SELECT Max(MyTable.Field1) AS NewRecord
FROM MyTable;

Second query (q2) would look like:

SELECT MyTable.*
FROM q1 INNER JOIN MyTable ON q1.NewRecord = MyTable.Field1;

Good Luck,
Poop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top