In my custom ribbon I use the getLabel function to write data to a button lable.
This works fine but unfortunately the data is only written to the lable on startup. When I move through my database I would like the lable to be updated. I am using the ribboncreator from avenius but can't seem to invalidate the control. I can only call the gobjRibbon.InvalidateControl("Btn_25") from the module that contains the code but not from another module (error message). Is there a way to invalidate from the Form_Current procedure or is there another way to force Access to refire getLabel?
Code:
Sub GetLabel(control As IRibbonControl, ByRef label)
' Callbackname in XML File "getLabel"
' To set the property "label" to a Ribbon Control
Select Case control.ID
Case "Btn_25"
label = "(" & Form_Daten!Anhang.AttachmentCount & ")"
''GetLabel''
Case Else
label = "*getLabel*"
End Select
End Sub
This works fine but unfortunately the data is only written to the lable on startup. When I move through my database I would like the lable to be updated. I am using the ribboncreator from avenius but can't seem to invalidate the control. I can only call the gobjRibbon.InvalidateControl("Btn_25") from the module that contains the code but not from another module (error message). Is there a way to invalidate from the Form_Current procedure or is there another way to force Access to refire getLabel?