RecordSet Problem

xMax

Registered User.
Local time
Today, 08:00
Joined
Aug 7, 2006
Messages
35
I have a recordset and I'm trying to get it to select the last entry in a certain row in a table but it doesn't support the MoveLast command and getting MoveNext command in a loop causes EOF error.
 
MoveLast moves to the last record in your recordset hence you cannot move to a next record, as there isn't any, hence the error.

Anyway, you're on the wrong track.
MoveLast moves to the last record in a recordset, which is not necessarily the last entry in your table.
To retrieve the last entry, you need an identifier (for instance, an autonumber column) which tells you what the last entry is.
If your table meets this requirement, you can retrieve the last entry by using the Max function, either in VBA or in a static query.

RV
 

Users who are viewing this thread

Back
Top Bottom