Programming navigation button off and on.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need the syntax for programming the navigation button off and on, when form
is open.

What event would I place this on. On Open or On Load?


Thank You
 
You would place it in the Form_Load event as follows:

***CODE BEGINS***

Private Sub Form_Load()
Me.NavigationButtons = False
End Sub

***CODE ENDS***

To turn them back on again simply change the False to True.

Cheers

John Webb
 
Just a quick note, you cannot change whether the navigation buttons appear
after the form is loaded; so you could not set up a command button to view
the navigation buttons - only when the form is being loaded.

Cheers

John Webb
 
The OnOpen and OnLoad event only occurs once so using those events to turn
Off/On Navigation doesn't make sense.
Try this...
Place a button on your form, and on the ONClick event use this code...
Me.NavigationButtons = Not Me.NavigationButtons
Open the form and click the button several times. The Navigation Buttons
should toggle On/Off .
Now customize that concept to your needs...
hth
Al Camp
 
John,
Just a quick note, you cannot change whether the navigation buttons appear
after the form is loaded;

I have to disagree... the Nav Buttons can be toggled On/Off with a
command button
I place a button on a form, and on the ONClick event I used this code...
Me.NavigationButtons = Not Me.NavigationButtons
I open the form and click the button several times. The Navigation
Buttons
toggle On/Off just fine. I just checked it again, and it works. (Access97)

hth
Al Camp
 
Wow, I wasn't aware you could change the navigation property once a form
was loaded; but I just tested and it works. Well, you learn something
everyday.

I still wont use it thou, I hate the standard form navigation ;-)
 
Back
Top