Handling of last record in form

  • Thread starter Thread starter RWIC
  • Start date Start date
R

RWIC

Guest
Built a survey with 25 questions. Have a 'next record' button, how do I:
1. Deactivate 'next record' button when they reach the last record
or
2. Avoid the error message when the 'next record' macro no longer has a next record to go to
 
I would suggest that you not use access tool bar to navigate records because I don't believe that it is possible to stop showing it after the last record however you might try looking up suppressing error messages.
 
The best I could come up with is using this in the On_Exit event of your last record:

cmdMessage.Visible = False

Just replace cmdMessage with your Next Record button. This will hide the button from the user. You could then use the start new survey button to set is visable properties to True.
 
Oh yea! I forgot, you can use:

DoCmd.SetWarnings False

to turn off warnings although I am not sure it will work in the example you provided above.
 

Users who are viewing this thread

Back
Top Bottom