Selecting the Last Record Via Query

N

Nuthin

I have created a fairly complex database via Access but without using any
SQL programming as I do not know how to program. Everything is Tables,
Queries, Forms, Macros and Reports done by hand. The situation I have been
trying to figure out lately is this: After a new record is created, I want
to be able to e-mail a report of it. I can do it if I prompt for the user
to enter the number of the record (generated by an AutoNumber field) but I
want it to be automatic. Right now, a button on the form starts a Macro
that opens a Report based on a Query. Everything I try puts all records
into the report but I just want the LAST record to be in it. I know some of
you geniuses out there can figure this one out. This is the fist problem
I've had to ask for help with so far. Thanks!

Nathan
 
J

Jessestonecedar

create an aggregate query using 'Max' on the autonumber field will provide the
last record.

Rich
 
N

Nuthin

Since there is no specific "Aggregate" query type, I assume you're referring
to turning on the Totals function in a Select query and selecting the Max
function on the Total line of the AutoNumber field. When I do that it
prompts for the number of the record to select which is what I'm trying to
avoid. Am I doing what you are suggesting? Thanks!

Nathan
 
Top