Form Controls
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Form Controls
Hi,
Is there a way to customize a database ribbon so that the only option that shows is the print ability? I can customize the ribbon on my laptop but I need to be sure that the same customization applies to anyone opening the database. Basically I only want the print options to be available.
Thanks,
Leesha
Is there a way to customize a database ribbon so that the only option that shows is the print ability? I can customize the ribbon on my laptop but I need to be sure that the same customization applies to anyone opening the database. Basically I only want the print options to be available.
Thanks,
Leesha
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Form Controls
You can create a custom ribbon that is stored in the database, so that it travels with it.
See Create a custom ribbon in Access.
See Create a custom ribbon in Access.
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
Thanks Hans! You are such a blessing!
Leesha
Leesha
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
I'm getting 2 errors when opening the Database. Please see below.
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
Hi Hans,
I spent all day researching the errors I'm getting as well as xml and it is beyond me. While searching I did find an interesting video on on to turn off the ribbon in VBA using DoCmd.ShowToolbar "ribbon", acToolbarNo
I tried it and it does exactly what I want. The drawback is that it doesn't show the print controls for a report that is print preview. The video showed how to create another form that would turn ribbons on and off but I don't want to give the end user that capability. I only want them to have the ability Print a report from print preview. Have you got any ideas on how this code could be modified to allow the print controls but to disable the rest?
Thanks!
Leesha
I spent all day researching the errors I'm getting as well as xml and it is beyond me. While searching I did find an interesting video on on to turn off the ribbon in VBA using DoCmd.ShowToolbar "ribbon", acToolbarNo
I tried it and it does exactly what I want. The drawback is that it doesn't show the print controls for a report that is print preview. The video showed how to create another form that would turn ribbons on and off but I don't want to give the end user that capability. I only want them to have the ability Print a report from print preview. Have you got any ideas on how this code could be modified to allow the print controls but to disable the rest?
Thanks!
Leesha
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 4StarLounger
- Posts: 564
- Joined: 27 Jun 2021, 10:46
Re: Form Controls
The schema (what the error message is calling the namespace) is out of date. Try using
Code: Select all
http://schemas.microsoft.com/office/2009/07/customui
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
Hi Speakeasy,
I had found the one you referenced and it doesn't work either. If you go directly to the the site it gives the message "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
Leesha
I had found the one you referenced and it doesn't work either. If you go directly to the the site it gives the message "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
Leesha
-
- 4StarLounger
- Posts: 564
- Joined: 27 Jun 2021, 10:46
Re: Form Controls
>it doesn't work either.
You won't want to hear this - but works absolutely fine here, I use it regularly for a couple of custom ribbons. Note that, despite its looks, It is not really a browsable URL (it is an XML namespace URI - universal resource identifier).
The following is a custom ribbon output I quickly created that gets close to what you want, if I have understood your requirements correctly. Works absolutely without problems here:
Note that one way of capturing correct XML for this sort of thing is to customise the ribbons the way you want through "Customise the Ribbon", 'OK' your changes, then reopen "Customise the Ribbon" and select Import/Export>Export all customizations this results in a file with XML in it that can then be used in the USysRibbons
You won't want to hear this - but works absolutely fine here, I use it regularly for a couple of custom ribbons. Note that, despite its looks, It is not really a browsable URL (it is an XML namespace URI - universal resource identifier).
The following is a custom ribbon output I quickly created that gets close to what you want, if I have understood your requirements correctly. Works absolutely without problems here:
Code: Select all
<customUI xmlns='http://schemas.microsoft.com/office/2009/07/customui'>
<ribbon startFromScratch='true'>
<tabs>
<tab idMso='TabPrintPreviewAccess' visible='true' />
</tabs>
</ribbon>
</customUI>
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
Thank you SpeakEasy. This worked like a charm and I appreciate the tip! Two questions,
1. Does using a custom ribbon cancel out the use of a custom icon for the database? When I used this code DoCmd.ShowToolbar "ribbon", acToolbarNo the database opens with the custom icon in the upper left corner. With the customized ribbon it opens with the Access icon.
2. Is there any way to block the "File" tab/ribbon from showing? I only want the print preview that you've given me.
Thanks!
Leesha
1. Does using a custom ribbon cancel out the use of a custom icon for the database? When I used this code DoCmd.ShowToolbar "ribbon", acToolbarNo the database opens with the custom icon in the upper left corner. With the customized ribbon it opens with the Access icon.
2. Is there any way to block the "File" tab/ribbon from showing? I only want the print preview that you've given me.
Thanks!
Leesha
-
- 4StarLounger
- Posts: 564
- Joined: 27 Jun 2021, 10:46
Re: Form Controls
I'm afraid the file tab is a special case, and is essentially untouchable through ribbon customisation
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
HI SpeakEasy,
That is good to know! Is it the same case with the icon?
Thanks,
Leesha
That is good to know! Is it the same case with the icon?
Thanks,
Leesha
-
- 4StarLounger
- Posts: 564
- Joined: 27 Jun 2021, 10:46
Re: Form Controls
>Is it the same case with the icon?
Custom icon is working fine here, in as much as it is doing what I would expect. Perhaps you have different expectations.
Custom icon is working fine here, in as much as it is doing what I would expect. Perhaps you have different expectations.
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
OK will keep testing. It's probably me :-) Thanks!
-
- 4StarLounger
- Posts: 564
- Joined: 27 Jun 2021, 10:46
Re: Form Controls
By the way, here's a slightly modified version of the ribbon xml that may be fractionally closer to your requested behaviour
Code: Select all
<customUI xmlns='http://schemas.microsoft.com/office/2009/07/customui'>
<ribbon startFromScratch='true'>
<tabs>
<tab idMso='TabPrintPreviewAccess' visible='true' />
<tab id='dbMyOptions' label='Options' insertBeforeQ='TabPrintPreviewAccess' visible='true'>
<group id='PrintOpts' label='Print Options' autoScale='true' >
<control idMso='FilePrintPreview' size='large' visible='true'/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
Thanks! I will give it a try. BTW, the custom icon shows it my task tray but the icon in the upper left corner of the database is the MS Access Icon.
-
- BronzeLounger
- Posts: 1489
- Joined: 05 Feb 2010, 22:25
Re: Form Controls
I like the new xml that you sent much better! Thanks!