×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Custom Ribbons in Access 2007 Projects

Custom Ribbons in Access 2007 Projects

Custom Ribbons in Access 2007 Projects

(OP)
Can you make custom ribbons in an Access 2007 project?  Or, because Projects are SQL table based, this is not possible as you cannot create a table to hold the custom ribbon names?

If you can, is there a good source to show how to do this?

Thanks for any help you can offer.

RE: Custom Ribbons in Access 2007 Projects

Access 2007 does not support creation of .adp's.

Cogito eggo sum – I think, therefore I am a waffle.
 

RE: Custom Ribbons in Access 2007 Projects

WRONG:

Quote:


Access 2007 does not support creation of .adp's.



OOPS! My memory is shot - sorry for the mis-info!
Here is a good starting point to further research your question:
http://office.microsoft.com/en-us/access/HA101679531033.aspx

Cogito eggo sum – I think, therefore I am a waffle.
 

RE: Custom Ribbons in Access 2007 Projects

(OP)
OK, after a couple days work and searching internet sites, I have the procedure that works pretty well for customized ribbons in Access 2007 PROJECTS.

What works best is to create a three table column in your SQL database with columns:  auto_id (autoNumber), RibbonName (varChar(50), and RibbonXML (varChar(6000). Manually enter your custom ribbon name and custom ribbon XML code into the appropriate columns - I only used on custom ribbon so I only have one record in the table.  I named my table dbo.CVC1_RibbonXML.

I then went to my Access project and created a new module with the following code:

Function LoadRibbons()

Dim RS As Recordset
Set RS = CurrentProject.Connection.Execute("Select CVC1_RibbonXML.RibbonName, CVC1_RibbonXML.RibbonXML from cvc1_RibbonXML")
If Not RS.BOF Then
Application.LoadCustomUI RS("RibbonName").Value, RS("RibbonXML").Value
End If

RS.Close
Set RS = Nothing
End Function

I named the module 'RibbonLoader'.  I then created an autoExec macro that ran the 'LoadRibbons' function in my module.

Now we're set up but I had to do a couple more things.  First, its a good idea to go into Access Options, Advanced and under General, click 'Show add-in user interface errors'.  Then click 'OK'.  This will show any errors in your XML code when Access tries to load your ribbon.

Also, the first time I attempted to load my new ribbon nothing happened so I again went into Access Options, Current Database, and MANUALLY typed in my ribbon name (from the column in the table) in the little ddl under 'Ribbon and Toolbar Options'. Then click 'OK'.   Don't know why I had to do this but after I typed it in manually, it was always there on future loads.  However, when I did this same routine on a brand new Access Project created with Access 2007, I did not have to do this manaul ribbon name entry.  ??

One more thing I did, don't know if it made any difference.  I am using a Project that was originally created in Access 2000. I had custom menu bars in that Project so I deleted them (using Access 2000) before opening and using the Project in Access 2007.

Some sites on the net recommend creating a bound form to the table that holds the custom ribbon information.  I found that very helpful in adding and editing my custom ribbon info.

Hope some of this helps someone down the line.
 

RE: Custom Ribbons in Access 2007 Projects

Sorry I lost track of this thread, batteam.
Here is a MS tutorial that is also helpful:
http://msdn.microsoft.com/en-us/magazine/cc163469.aspx

Thanks for posting back your solution!

Cogito eggo sum – I think, therefore I am a waffle.
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close