Greyed out button if record =0

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
 
P

pietlinden

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top