Custom Ribbons (1 Viewer)

Joshann

Registered User.
Local time
Today, 04:24
Joined
Mar 22, 2002
Messages
142
I have read a lot about this, but I'm very new to Access 2007 and custom ribbons and am having a really hard time figuring this out. I want to be able change the default ribbon depending on certain things.

So I started by creating a UsysRibbons table. The table has two records. One with a RibbonName of AdminTab and another with a RibbonName of AllUserTab. I want to programmatically display one or the other of the ribbons. I cannot simply change the form properties because I have way too many forms to do that. I need to be able to change the default ribbon.

So for example, code that would run when the database opens would say:

Code:
If certaincondition = True then
     What code do I put here to display the ribbon named AdminTab?
Else
     What code do I put here to display the ribbon named AllUsersTab?
end if

Any help would be GREATLY appreciated!
 

dkinley

Access Hack by Choice
Local time
Today, 04:24
Joined
Jul 29, 2008
Messages
2,016
Here is one tutorial I have used before ..... that should get you an idea of what is going on.

This proved very helpful, too.

HTH,
-dK
 
Last edited:

Joshann

Registered User.
Local time
Today, 04:24
Joined
Mar 22, 2002
Messages
142
Thanks, but unfortunately, that didn't help with my specific question.
 

dkinley

Access Hack by Choice
Local time
Today, 04:24
Joined
Jul 29, 2008
Messages
2,016
Ah yes, I see. Depending on the user group the logic will determine which ribbon to use.

In the past I have defined multiple ribbons but only use the form/report properties to determine which ribbon to be used. Admins for the applications I have written usually get access to hidden forms so perhaps that was my way of working around it.

Access is somehow doing it through the properties so their might be a way .... Hmmmmm.

-dK
 

Avelino

Registered User.
Local time
Today, 06:24
Joined
Dec 10, 2009
Messages
56
Hello

I think it is easier to use just one ribbon with two tabs. The admin tab would be controlled by the attribute getVisible

download example

To study about the use of gets (getVisible, getEnabled, ...) see the article and video

http://www.ribbon01.com/tutoriais/tuto10eng.asp#inicio

Success
 

Attachments

  • joshann.zip
    23.5 KB · Views: 138

Joshann

Registered User.
Local time
Today, 04:24
Joined
Mar 22, 2002
Messages
142
I will try that. Thank you very much.
 

Avelino

Registered User.
Local time
Today, 06:24
Joined
Dec 10, 2009
Messages
56
Can I offer another suggestion if it does not work, ok
 

Users who are viewing this thread

Top Bottom