Select Last Record

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I'm trying to get the last record from myTable and get myField1 and
myDateField2. I think it can be done using LAST() and also using the date
value of myDateField2, but I'm not having any luck.

Any help?

CODE ********
sSQL = "SELECT LAST(myFieldID), myField1, myDateField2 FROM myTable"
 
Try this, I used a query that only shows 1 record and sorted Descending.

SELECT TOP 1 tCommission.CommissionID, tCommission.CustomerName,
tCommission.DateEntered
FROM tCommission
ORDER BY tCommission.CommissionID DESC;

You need to change the SQL code to suit.

Ross
 

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

Similar Threads


Back
Top