Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Invalidate a riboon

Posted on 2014-01-20
4
Medium Priority
?
201 Views
Last Modified: 2014-01-21
I have a ribbon named MyRibbon. How can I invalidate it from VBA?
0
Comment
Question by:jrmcanada2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 85
ID: 39796551
What do you mean by "invalidate"? Do you mean stop it from showing, or disable it, or what?
0
 
LVL 75
ID: 39797638
Invalidate is a VBA Ribbon command. The sample dbs that was on the link here have examples. Removing the link to the most useful Ribbon site on the planet seems a bit much :-(

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1800 total points
ID: 39798111
The sample db attached from Here has examples of the Validate command.

Open the VBA editor and search for 'invalidate'

For example:

Private Sub btnSet_Click()
Dim strSQL As String

    If Nz(Me!lstData, 0) <> 0 Then
        strSQL = "UPDATE tblData SET tblData.txtName = '" & Nz(Me!txtText, " ") & "', tblData.txtSubName = '" & Nz(Me!txtSubText, " ") & "', tblData.txtImageMso = '" & Me!ComboImageMso & "', tblData.bolVisible = " & Me!chkVisible & " "
        strSQL = strSQL & "WHERE (((tblData.ID)=" & Me!lstData & ")); "
       
        CurrentDb.Execute strSQL
        Me!lstData.Requery
        Me!txtText = ""
        Me!txtSubText = ""
        Me!chkVisible = 0
        Me!lstData = Null
        Me!ComboImageMso = ""
    End If
   
    gobjRibbon.Invalidate
   
End Sub
InvalidateRibbonExample.zip
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question