Solved

Invalidate a riboon

Posted on 2014-01-20
4
192 Views
Last Modified: 2014-01-21
I have a ribbon named MyRibbon. How can I invalidate it from VBA?
0
Comment
Question by:jrmcanada2
  • 2
4 Comments
 
LVL 84
Comment Utility
What do you mean by "invalidate"? Do you mean stop it from showing, or disable it, or what?
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
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 - Access MVP) earned 450 total points
Comment Utility
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now