Navigation buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have my own navigation buttons, but if I use the integrated navigation
buttons of the form, my own buttons are not synchronized. If I'm on the last
but one record and I push the integrated next record button, my own next
button is not disabled and Access will produce an error if I click on it. Is
there a way to synchronize my own buttons with the integrated ones, or is the
only way is to disable the integrated ones ? Thanks
 
Hi, I have my own navigation buttons, but if I use the integrated navigation
buttons of the form, my own buttons are not synchronized. If I'm on the last
but one record and I push the integrated next record button, my own next
button is not disabled and Access will produce an error if I click on it. Is
there a way to synchronize my own buttons with the integrated ones, or is the
only way is to disable the integrated ones ? Thanks

Code the form's Current event:

CmdPreviousRecord.Enabled = Not Me.CurrentRecord = 1
CmdNextRecord.Enabled = Me.CurrentRecord = 1 Or Me.CurrentRecord <
Me.Recordset.RecordCount

Change CmdPreviousRecord and CmdNextRecord to whatever the actual
names of your command buttons are.
 
Back
Top