Hi All,
I am having a problem with getenabled (Enable/dissable a control/button). Opening the form doesn't disable the button but I just can't spot a problem with what I have. I have checked and double checked all names. Any help would be appreciated.
In the xml I have:
<button id="MaintClientRegion" label="Regions"
tag="frmMaintClientRegion" onAction="ribOpenForm" getEnabled="ControlEnabled"
size="normal" supertip="Maintenance - Regions"/>
In a module I have:
Public Sub ControlEnabled(control As IRibbonControl, ByRef enabled)
Select Case control.id
Case "MaintClientRegion"
If CurrentProject.AllForms("frmMaintClientRegion").IsLoaded Then
enabled = False
Else
enabled = True
End If
End Select
End Sub
And on the form.. form code... I have:
Private Sub Form_Close()
If Not globalRibbon Is Nothing Then
globalRibbon.InvalidateControl ("MaintClientRegion")
End If
End Sub
Private Sub Form_Load()
If Not globalRibbon Is Nothing Then
globalRibbon.InvalidateControl ("MaintClientRegion")
End If
End Sub