Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with Homemade Navigation Buttons 1

Status
Not open for further replies.

mrgrogro

Technical User
Jan 8, 2005
58
0
0
US
I have a form that I've created. I've set up my own navigation buttons. They work fine on one form but not on a new form that I copied from the form that works. Each time I click the navigation button for the next record, I get the message "You can't go to the specified record. You may be at the end of a recordset." When I click the button a second time, I advance to the next record. Clicking the button again starts the sequence over. I get the error message the first time and on the second try it goes forward by one record. I have used VBA code for the navigation buttons and have even tried macros instead with the same results. One last clue, if I place an "off the shelf" command button in the form, it works fine as well as the button I created. I'm still using Access97. Any advice would be appreciated as I'm at the end of my rope. Thanks in advance
 
How are ya mrgrogro . . .

Try this instead:
Code:
[blue]   If Me.CurrentRecord = Me.Recordset.RecordCount Then
      MsgBox "Last record is current. Can't Move!"
   Else
      Me.Recordset.MoveNext
   End If[/blue]

Calvin.gif
See Ya! . . . . . .
 
Thanks AceMan1! I found the problem. I'm not sure what the issue was but I relinked the table and it seems to work fine now. Here's your star. Thanks for offering a helping hand!

kp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top