Rabu, 27 Juli 2011

[MS_AccessPros] Re: Hiding the Ribbon

 



Good work John! It works like a charm. Thanks everyone for your help.

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Bradley-
>
> It's a timing bug in Access. I had to do this to get it to work:
>
>
> Private Sub Form_Load()
> Dim sglTimer As Single
> ' Make sure I'm fully loaded
> Me.SetFocus
> ' Wait a sec to let the Ribbon paint
> sglTimer = Time
> Do Until (Time - sglTimer) > 2
> DoEvents
> Loop
> ' Now try to hide the ribbon
> DoCmd.ShowToolbar "Ribbon", acToolbarNo
>
> End Sub
>
> Note that I moved your code from the Open to the Load event.
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bradley
> Sent: Wednesday, July 27, 2011 11:11 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Re: Hiding the Ribbon
>
> Bill, I created several macros, but they are all very simple, and I don't see
> the word AutoExec anywhere. Maybe I'm not looking in the right place. Maybe
> someone else could take a peek.
>
> As you can see from my previous post, John and I both noticed that when
> FrmMaster is opened from the navigation pane the ribbon disappears, but for some
> reason it doesn't disappear when FrmMaster is opened as the Startup Form. Any
> more ideas?
>
> --- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@>
> wrote:
> >
> > Bradley
> >
> > The "Display form" is the same thing as the startup form. Do you have a macro
> named AutoExec? If so, that might be interferring with the startup form.
> >
> > Bill Mosca, Founder
> >
> > --- In MS_Access_Professionals@yahoogroups.com, "Bradley" <bradgriffis@>
> wrote:
> > >
> > > It sounds like we're getting close, but I must be missing something. I see
> that when hold my shift key down and go into the DB and double-click FrmMaster
> from the navigation pane, the ribbon is gone. But if I close the DB and bring
> back up by double-clicking on the DB file itself, the ribbon is still there. I
> checked the Access Options and the "Display Form" is FrmMaster. Is there a
> "Startup Form" property I need to set?
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@>
> wrote:
> > > >
> > > > Bradley-
> > > >
> > > > When I open FrmMaster in the sample database you uploaded, the Ribbon
> hides just
> > > > fine. You have to make FrmMaster the Startup form.
> > > >
> > > > John Viescas, author
> > > > Microsoft Office Access 2010 Inside Out
> > > > Microsoft Office Access 2007 Inside Out
> > > > Building Microsoft Access Applications
> > > > Microsoft Office Access 2003 Inside Out
> > > > SQL Queries for Mere Mortals
> > > > http://www.viescas.com/
> > > > (Paris, France)
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: MS_Access_Professionals@yahoogroups.com
> > > > [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bradley
> > > > Sent: Wednesday, July 27, 2011 8:44 PM
> > > > To: MS_Access_Professionals@yahoogroups.com
> > > > Subject: [MS_AccessPros] Re: Hiding the Ribbon
> > > >
> > > > Thanks John, I experimented with a test database I put on our company
> network
> > > > drive. I added the code to the "On Open" event of the master form, then
> went to
> > > > the trust center and browsed for my database and made it a Trusted
> Location. I
> > > > closed the DB and re-opened. The ribbon is still there. Any other ideas?
> > > >
> > > > --- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@>
> wrote:
> > > > >
> > > > > Bradley-
> > > > >
> > > > > If your database isn't in one of the "trusted" locations listed, then
> none of
> > > > > the code will run when you open the database.
> > > > >
> > > > > John Viescas, author
> > > > > Microsoft Office Access 2010 Inside Out
> > > > > Microsoft Office Access 2007 Inside Out
> > > > > Building Microsoft Access Applications
> > > > > Microsoft Office Access 2003 Inside Out
> > > > > SQL Queries for Mere Mortals
> > > > > http://www.viescas.com/
> > > > > (Paris, France)
> > > > >
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: MS_Access_Professionals@yahoogroups.com
> > > > > [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bradley
> > > > > Sent: Wednesday, July 27, 2011 5:49 PM
> > > > > To: MS_Access_Professionals@yahoogroups.com
> > > > > Subject: [MS_AccessPros] Re: Hiding the Ribbon
> > > > >
> > > > > Thanks Crystal, I took a look at the "Trusted Locations" in the Trust
> Center,
> > > > > but am unsure what I should see, or what I need to do. I'll keep doing
> some
> > > > > research. Let me know if you find the answer in the meantime.
> > > > >
> > > > > --- In MS_Access_Professionals@yahoogroups.com, Crystal
> <strive4peace2008@>
> > > > > wrote:
> > > > > >
> > > > > > Hi Bradley,
> > > > > >
> > > > > > Do you have your Trust Center locations set up? In other words, is
> the
> > > > macro
> > > > > not working because it is being blocked? I am running off to class so I
> don't
> > > > > have time to look up links -- perhaps someone else can expand on this
> > > > > >
> > > > > > warm regards,
> > > > > > Crystal
> > > > > >
> > > > > > (: have an awesome day :)
> > > > > >
> > > > > > --- On Wed, 7/27/11, Bradley wrote:
> > > > > >
> > > > > >
> > > > > > > Thank you both for the help. I'm not
> > > > > > > aware of an occurrence of ShowToolbar in any of the macros I
> > > > > > > created, and I am not sure what SendKeys is. If you get a
> > > > > > > chance, could you please take a look at my test database to
> > > > > > > see if you can find the problem? I'll keep looking in the
> > > > > > > meantime. It may help to know that my database was created
> > > > > > > in version 2003 and then converted to version 2007 and
> > > > > > > modified. Thanks again.
> > > > > > >
> > > > > > > --- "acravenrohm" <yahoo@> wrote:
> > > > > > > >
> > > > > > > > The command you're using is correct if what you're
> > > > > > > trying to do is maximise the amount of space you have on
> > > > > > > screen. If you just want to get rid of the stuff from the
> > > > > > > ribbon then you are going to have to look at creating an XML
> > > > > > > file as described in one of the other answers.
> > > > > > > >
> > > > > > > > The code works for me so there must be something else
> > > > > > > going on in your Database that's switching the ribbon back
> > > > > > > on.  Have you searched for other occurences of the
> > > > > > > ShowToolbar in code or macros?  Or maybe a SendKeys?
> > > > > > > >
> > > > > > > > --- > "Bradley" <bradgriffis@> wrote:
> > > > > > > > >
> > > > > > > > > Hello, I want to hide the ribbon on my database.
> > > > > > > I put the following code in the "On Open" event of my
> > > > > > > startup form "FrmMaster," but the ribbon still appears. What
> > > > > > > am I doing wrong?  My test database is "TimeTool_3" in
> > > > > > > the "PTS Time Tool" folder. I use Access 2007 and my
> > > > > > > experience level is beginner.
> > > > > > > > >
> > > > > > > > > Private Sub Form_Open(Cancel As Integer)
> > > > > > > > >     DoCmd.ShowToolbar
> > > > > > > "Ribbon", acToolbarNo
> > > > > > > > > End Sub
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > >
> > > > > > > > > Brad
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ------------------------------------
> > > > >
> > > > > Yahoo! Groups Links
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > ------------------------------------
> > > >
> > > > Yahoo! Groups Links
> > > >
> > >
> >
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar