renaming the navigation buttons at the bottom of a form

D

Dave

i know I can build my own navigation buttons but the ones that are provided
on a form are sufficient form me. However I have 4 subforms that build off
each other and it gets somwhat confusing for people to see which navigation
set goes with which form. If a name could be provided it would solve my
problem. I notice the word Record: . If that could be renamed or if a name
could be put to the right of the navigation buttons that would work too.
please help. thanks. if not I will just start building buttons everywhere
which I don't want to have to do.
 
K

Klatuu

The Navigation Buttons property has no name, but there is a trick you can use
to Hide and Show the buttons based on whether you are in the Form or the Sub
form.
That is to use the Enter and Exit events of the subform control (Not the
subform, but the subform control on the main form. Here is an example from
the testing I did:

Start in design view with the main form's Navigation Buttons property set to
Yes and the sub forms's set to No.

When you click anywere in the sub form, the sub form's buttons are on and
the main form's buttons are off. when you click anywhere in the main form,
it reverses them.

Private Sub Child6_Enter()
Me.NavigationButtons = False
Me.Child6.Form.NavigationButtons = True
End Sub

Private Sub Child6_Exit(Cancel As Integer)
Me.NavigationButtons = True
Me.Child6.Form.NavigationButtons = False
End Sub

Thanks for the question. It was something I was considering because I have
the same problem with users clicking the wrong buttons and I was going to get
around to it anyway, so now I have :)
 
F

Fred Boer

Dear Klatuu:

That's neat! I just tried in on a form I have. I also added the same code to
supress the subform navigation buttons and activate the main form's
navigation buttons in the OnActivate event of the main form...

Thanks for the idea!
Fred Boer
 
K

Klatuu

Glad you like it fred, you can do it in the activate, but all I did was in
design view, make the main form's navbutton property yes and for the subform
no.
 
K

Klatuu

Truth be known, I normally use my own Nav button scheme, too. Mainly because
people get all wierd about record numbers. "Yesterday I went to record 204 to
get my customer, but now it's not there! what is wrong with the database?"
You can't get them to understand that record numbers are meaningless
(especially bean counters = my users).
 
Top