Displaying Last Record of a Query

D

Dave

I have run a query from a table, pulling 5 of the 10
fields of information. What I would like to do is have
the query only display the last record of however many
entries there are. How would I go about doing this?

Reason I am displaying last record is so I can do a
columnar report to print to an rtf file so I can copy /
paste data into an excel document / as400. If anyone has
any ideas on a better way to do this, please tell me!!

Thanks!
 
J

Jeff Boyce

Dave

Define "last". What you think of as last, and what Access considers last
may not match up. If you mean "the most recently-entered row", how does
Access know which one you mean? Do you also record a date/time?

If you want to export data to Excel, you can build a query and use
File/Export to send it (or one of the TransferX() functions).

Good luck

Jeff Boyce
<Access MVP>
 
D

Dave

Thanks for the response!

What I mean by last is by ID number. ID number is my
primary key and increases positively by 1 each record...so
if there are 100 records, and id is 180 (meaning I deleted
80 records), then I want it to show id 180 (or the 100th
record). Access sees the last record as being the last ID
number, I would assume.

Also, exporting to an excell file shows the column's
horizontally when I would like to show them vertically,
and is the reason why I am having such troubles.

Any ideas?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top