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)


.
 

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

Check for last record 3
last record 1
Need combo box to refresh when moving to new record 2017 1
Access Dcount (multiple criteria) 3
Subform Navigation 3
Code wont trigger 5
Refresh Subform Current Record? 3
Run-time error 3021 6

Back
Top