What is wrong with the below?
If RecordCount < 2 Then
Me.Command44.Enabled = False
Else
DoCmd.GoToRecord , , acPrevious
End If
Basically I am wanting to disable the button if there are fewer than 1 record (to avoid the "debug" error if there are no records and someone clicks the button)
I will then inturn modify this for the "Next record" button for when there is only 1 record.
Also, if anyone knows of a way to build a button to take the place of the Page up and page down buttons on the keyboard, that would be great as well.
If RecordCount < 2 Then
Me.Command44.Enabled = False
Else
DoCmd.GoToRecord , , acPrevious
End If
Basically I am wanting to disable the button if there are fewer than 1 record (to avoid the "debug" error if there are no records and someone clicks the button)
I will then inturn modify this for the "Next record" button for when there is only 1 record.
Also, if anyone knows of a way to build a button to take the place of the Page up and page down buttons on the keyboard, that would be great as well.