How do I return the last entry in a table for a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having trouble returning the last value in a payment table. It either
returns nothing or every transaction.
 
Try doing a query based on the max Transaction Date.

If you paste your current SQL I might be able to help more....
 
ljskipper said:
I am having trouble returning the last value in a payment table. It
either returns nothing or every transaction.

First you need to know the records in a table are not in any special
order. If you want the last record, you will need to add a time stamp so
there is a guaranteed way of determining what entry was last.

With that you could use a select query to select the latest time.
 
How do I add a time stamp to the query

Joseph Meehan said:
First you need to know the records in a table are not in any special
order. If you want the last record, you will need to add a time stamp so
there is a guaranteed way of determining what entry was last.

With that you could use a select query to select the latest time.
 
ljskipper said:
How do I add a time stamp to the query

You add a time-date field to the table and make sure an event setting
this field to Now().
 

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

Back
Top