Instead of disabling the button, how about notifying the user ?
Code:
Private Sub Command29_Click()
10 On Error GoTo Command29_Click_Error
20 DoCmd.GoToRecord , , acPrevious
30 On Error GoTo 0
40 Exit Sub
Command29_Click_Error:
50 If Err.Number = 2105 Then
60 MsgBox "This is the first record"
70 Else
80 MsgBox "Error Line: " & Erl & vbNewLine & "Error " & Err.Number & " (" & Err.description & ") in procedure Command29_Click of VBA Document Form_Form1"
90 End If
End Sub
Code:
Private Sub Command30_Click()
10 On Error GoTo Command30_Click_Error
20 DoCmd.GoToRecord , , acNext
30 On Error GoTo 0
40 Exit Sub
Command30_Click_Error:
50 If Err.Number = 2105 Then
60 MsgBox "This is the last record"
70 Else
80 MsgBox "Error Line: " & Erl & vbNewLine & "Error " & Err.Number & " (" & Err.description & ") in procedure Command30_Click of VBA Document Form_Form1"
90 End If
End Sub