Form Navigation

  • Thread starter pushrodengine via AccessMonster.com
  • Start date
P

pushrodengine via AccessMonster.com

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.
 
S

Steve Schapel

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)
 
Top