SOLVED

Hide Navigation Buttons on Linked Table

Copper Contributor

Hi

 

I have a parent form with a linked child table which all works fine but I want to hide the navigation buttons on the linked table.  I know the VBA code for hiding the buttons but the only event handlers are On Enter and On Exit so the code only works when the table is clicked.  I cannot find anywhere with information on how to do this or if it is even possible

 

Can anybody help?

 

Thanks

6 Replies

@ChrisAKFS 

First, let's see if we can get on the same page with the descriptions.

 

Forms don't have "linked child tables". We need to know what that means in this context. 

 

A form can contain an embedded subform. And the subform would be bound to a different table. The two forms can be linked like this. 

 

GeorgeHepworth_0-1719231467561.png

 

 

Maybe you can provide a screenshot of what you see so that can guide us to what the situation is in your context.

All forms have the property which allows you to show or hide the Navigation buttons, so there's no need to do that programmatically. Perhaps that's all you need to do.

 

GeorgeHepworth_1-1719231666017.png

 

A screenshot of what you see can help confirm what we're working with.

@George_Hepworth 

Hi George, thanks for the reply. I should say I'm no Access expert. I referred to it as a linked child because of the entries you have pointed to in the data tab. Anyway, here's the screenshot which shows the navigation buttons for the table which are the ones I want to hide.

 

ChrisAKFS_0-1719232476537.png

 

Design View shows the Table like this:

 

ChrisAKFS_1-1719232680042.png

 

The navigation button property only applies to the main form.  The are no navigation button options for the table.

Hi Chris,

 

The second picture shows that you have used a table as Source Object of the subform. Instead of this, first create a form on the basis of the table, save that form, and use this new form as Source Object of the subform. Then you have the properties to hide the navigation buttons as described by George.

 

Servus
Karl
****************

Access Forever
Access News
Access DevCon
Access-Entwickler-Konferenz AEK

@ChrisAKFS , you can also use VBA to hide the subform's Navigation button.

You add code to the Main form's Load event:

 

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

 

best response confirmed by ChrisAKFS (Copper Contributor)
Solution
Karl and Arnel are quicker.
While it is possible to simply embed a table directly in a subform control, you lose the ability to manage it as effectively as when you use a form in a subform control. In this case, for example, you lose the ability to hide Navigation buttons. Sometimes, in the early stages of learning Access, we find things that seem handy (like embedding a table in a subform control), but which turn out not to be the most appropriate or effective or flexible approach. The key is to keep an open mind and continue refining your tool kit as you gain more experience.

Thanks to you all for your answers.  I chose to remove the embedded table and insert a subform for which I now have the controls I need.

1 best response

Accepted Solutions
best response confirmed by ChrisAKFS (Copper Contributor)
Solution
Karl and Arnel are quicker.
While it is possible to simply embed a table directly in a subform control, you lose the ability to manage it as effectively as when you use a form in a subform control. In this case, for example, you lose the ability to hide Navigation buttons. Sometimes, in the early stages of learning Access, we find things that seem handy (like embedding a table in a subform control), but which turn out not to be the most appropriate or effective or flexible approach. The key is to keep an open mind and continue refining your tool kit as you gain more experience.

View solution in original post