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!

*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.

Jobs

Why does the ribbon not appear until I click on a field?

Why does the ribbon not appear until I click on a field?

(OP)
I have a main form (acts as a portal into the system), a form from which the user can edit/maintain their data, a form from which the user can select and filter reports, and a several forms that allow the user to maintain look-up tables.

When I open the main form, the custom ribbon I have created for that form is displayed. However, when I open any other form, the ribbon assigned to that form is not shown until I click on a field on that form. I have tried setting focus to a field on the form (followed by DoEvents), but no luck.

The code for handling the ribbons is the same for all of my forms (including the main). Is there something else I need to do for the ribbon to appear without having to click on a field?

RE: Why does the ribbon not appear until I click on a field?

(OP)
I discovered how to make it work. On the Activate event of the form I invalidate the ribbon, doevents, and then set the active tab.

RE: Why does the ribbon not appear until I click on a field?

For clarity and others looking, can you post your code? I for one am not sure what you mean by invalidate the ribbon... Possibly because I have not had to do a whole lot with them.

RE: Why does the ribbon not appear until I click on a field?

(OP)
I'm not sure if I'm doing this correctly. It's been several years since I messed with it in Access 2007. I have a situation where, from the main form, the user is allowed to open a LookUp form via an item located on the ribbon. Because the LookUp form was loaded from the ribbon, the main form is hidden while the lookup form is shown. When the LookUp form is opened, the OnRibbonLoad event is launched. In the OnRibbonLoad event I store the ribbon in a public variable (myRibbon). I then issue the command myRibbon.iRibbon.Invalidate followed by myRibbon.iRibbon.ActivateTab "tabIwant".

If I remember correctly, I have to invalidate the ribbon in order to refresh it.

Prior to closing, the LookUp form unhides the main form. The onActivate event of the main form issues the same command: myRibbon.iRibbon.Invalidate followed by myRibbon.iRibbon.ActivateTab "tabIwant".

Note that I have a collection of ribbons assigned to a public variable (allRibbons). So, myRibbon is set equal to the allRibbons("nameOfribbon") in the OnRibbonLoad event and the onActivate event.

RE: Why does the ribbon not appear until I click on a field?

I see... the only things I have done with the ribbon are to make a custom one that loads instead of the standard with the XML tags...

Somehow I missed the ribbon supports event code. Something to have a look at sometime anyways.

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!

Resources

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