Greyed out button if record =0

  • Thread starter Thread starter Faz
  • Start date Start date
F

Faz

I use two buttons to navigate through a form using the macro function GO TO
PREVIOUS and GO TO NEXT. Button1=Previous and Button2=Next; when i am at
record=0 and press button1(previous) the program gives an error and crashes.
How can i have the buttons greyed out when record=0 and record="LAST REC"
Thanks
Faz
 
I use two buttons to navigate through a form using the macro function GO TO
PREVIOUS and GO TO NEXT. Button1=Previous and Button2=Next; when i amat
record=0 and press button1(previous) the program gives an error and crashes.
How can i have the buttons greyed out when record=0 and record="LAST REC"
Thanks
Faz

Me.cmdPrevious.Enabled=Not rs.BOF
Me.cmdNext.Enabled=Not rs.EOF
 
Back
Top