Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Remove Navigation Control on Subform

Posted on 2009-12-24
15
Medium Priority
?
942 Views
Last Modified: 2012-05-08
We need to be able to remove the navigation controls on the bottom of a subform.  The subform souce is a query and not form.
0
Comment
Question by:REIHELPDESK
  • 7
  • 4
  • 2
  • +2
15 Comments
 
LVL 75
ID: 26120798
On the actual form this is the subform, the Form Property Sheet ... set the Navigation Button property to No.

mx
0
 
LVL 75
ID: 26120801
typo ... form THAT is the subform ....
0
 

Author Comment

by:REIHELPDESK
ID: 26120808
That's what I thought and have tried.  That option is not available.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 75
ID: 26120819
Exactly where ... are you trying to set this option?

Note that you need to find the actual form being used as the Source Object on the subform control ... in the database window, then open that form in design view and set the property there.

mx
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 26121216
Hi,

If the subform is a datqasheet you cennot remove the navigation or record selectors.

Bill

0
 
LVL 75
ID: 26121220
So ... if ... it is a 'datasheet' form ... then no, no can do. So, to make that happen, you would have to convert to a Continuous form .... then you could turn them off as I indicated.

mx
0
 
LVL 75
ID: 26121221
btw ... good point Bill.

mx
0
 

Author Comment

by:REIHELPDESK
ID: 26121270
Ok the subform is based on a query and not a form.  Should I setup a form with the query and then use it on our masterform?
0
 
LVL 75
ID: 26121272
"the subform is based on a query and not a form."

A 'subform' is still a regular Form.  Any form, whether used as a 'main' form or a 'subform'  on a main form is based on either a query (or SQL statement) or table.  A 'subform' is not based on a 'form'.

The question we need an answer to is ... is the subform being as a Form in Datasheet View or a Form in Continuous Form view"

And what version of Access is this?

mx
0
 
LVL 7

Expert Comment

by:msacc97
ID: 26123298
REIHELPDESK,

You cannot turn off Record Selector for a subdatasheet, but you can turn off Navigation Buttons.
When you create a subform based on a query, Access creates a form and inserts it into your main form automatically.

So you must open this new form based on your query in Design View (its name, if created automatically will be type of: "Query1 subform") and change its Navigation Buttons property to No, as DatabaseMX said.
ScreenShot007.jpg
0
 

Author Comment

by:REIHELPDESK
ID: 26123528
Okay, thanks and I understand that I need to change the subform that ms created.  The form name that's listed is not available.  I have attached a sample database with only the needed items for review.

Please look at the only form and look at the subform and tell me what I'm doing wrong, as I can't figure it out.

The attached file was saved in Access 2003 so I could upload it.

Thanks, Rick
Database1.mdb
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 26123580
ok ... I because this was created in A2007, I had trouble saving the main form you created with my changes.  So, I created a new version - without the tab for now.  I also created a subform and added it to this main form.  The end result should be more or less what you are looking for.  There are *no* nav buttons on the subform.

Check it out ...

mx
Database1-MX01.zip
0
 
LVL 58

Expert Comment

by:harfang
ID: 26123746
When a query or a table is used as a subform, the form properties become available only at run-time. There is no option to disable them at design time, because the subform doesn't exist yet.

Add the following code to the main "form open" event, assuming the subform *control* is called subQuery1 (regardless of the content of the control, say Query.Query1).

Most subform properties are available like this at run-time, including event handlers.

(°v°)
Private Sub Form_Load()
    subQuery1.Form.NavigationButtons = False
End Sub

Open in new window

0
 
LVL 7

Expert Comment

by:msacc97
ID: 26124785
harfang is correct

In our case placing

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

in On Load event of frmAwardsLookupBySiteCode form will do the job
Database1.mdb
0
 

Author Closing Comment

by:REIHELPDESK
ID: 31669862
Great Job.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

804 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question