By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

error checking for DoCmd.GoToRecord acNext when it is the last record

P: n/a
Hey folks --

I'm using the DoCmd.GoToRecord , , acNext to jump to the next record
after the user enters a value. The problem is, it throws an error if
it's already on the last record! What's the best way to prevent this?

Steve Lefevre
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
STeve Lefevre <le********@osu.edu> wrote in
news:AA*****************@fe1.columbus.rr.com:
Hey folks --

I'm using the DoCmd.GoToRecord , , acNext to jump to the next
record after the user enters a value. The problem is, it
throws an error if it's already on the last record! What's the
best way to prevent this?

Steve Lefevre


If Me.Recordset.AbsolutePosition + 1 < Me.Recordset.RecordCount
Then
DoCmd.GoToRecord , , acNext
End If

Watch the word wrap.

Bob Quintal
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.