I have a form called “frmIncidentForm” that has a “Next Button”, “Previous
Button” and “Add Button”
The form will only allow editing of records within the opened form.
I would like to disable the “Previous Button” and “Next Button” when the form
is first opened.
Then as records are added the “Previous Button” is enabled.
If the user navigates backward the “Next Button” is enabled.
Basically, I would like the buttons to only be enabled when there are records
to navigate to.
Steve Schapel - 20 Dec 2007 05:50 GMT
Pushrod,
You can use the Current event of the form.
Experiment with code something along these lines:
Me.NameOfPreviousButton.Enabled = (Me.CurrentRecord > 1)
Me.NameOfNextButton.Enabled = (Me.CurrentRecord <
Me.RecordsetClone.RecordCount)

Signature
Steve Schapel, Microsoft Access MVP
> I have a form called “frmIncidentForm” that has a “Next Button”, “Previous
> Button” and “Add Button”
[quoted text clipped - 8 lines]
> Basically, I would like the buttons to only be enabled when there are records
> to navigate to.
pushrodengine - 20 Dec 2007 21:24 GMT