467,921 Members | 1,234 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,921 developers. It's quick & easy.

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

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
  • viewed: 15313
Share:
1 Reply
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.

Similar topics

1 post views Thread by sixsoccer | last post: by
1 post views Thread by gavm360 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.