syntax for last record

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

What is the syntax for the question

If current record is last record then ...

While checking if the current record is the first record I
am using:

If Me.CurrentRecord = 1 Then ...

Thanks for advice.

Tony
 
Tony said:
What is the syntax for the question

If current record is last record then ...

While checking if the current record is the first record I
am using:

If Me.CurrentRecord = 1 Then ...

Thanks for advice.

Tony

You could use something like this:

Dim fLastRecord As Boolean

With Me.RecordsetClone
.Bookmark = Me.Bookmark
.MoveNext
fLastRecord = .EOF
End With
 
Dirk Goldgar said:
You could use something like this:

Dim fLastRecord As Boolean

With Me.RecordsetClone
.Bookmark = Me.Bookmark
.MoveNext
fLastRecord = .EOF
End With

I had better point out that that code is designed to tell you if you're
at the last *existing* record, not if you're on the new record. For the
new record, you can use

If Me.NewRecord Then
 
Thanks for help.

Tony

-----Original Message-----


I had better point out that that code is designed to tell you if you're
at the last *existing* record, not if you're on the new record. For the
new record, you can use

If Me.NewRecord Then

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top