xml hide form

Jaye7

Registered User.
Local time
Tomorrow, 07:42
Joined
Aug 19, 2014
Messages
205
does anyone know the xml code to hide a form, I want to add it to my xml that creates the ribbon.
 
I don't believe you use xml in Access to hide stuff. If you want your ribbon to execute commands, you use callbacks, so define the onAction property of a button. Then write a sub that will handle that call. Then, in that sub, hide the form.

Add an "onAction" property to the button in your ribbon xml . . .
Code:
<button id="[COLOR="Blue"]btnHideFormA[/COLOR]" label="Hide FormA" onAction="[COLOR="DarkRed"]RibbonButtonClick[/COLOR]" />
Then add that sub . . .
Code:
Sub [COLOR="DarkRed"]RibbonButtonClick[/COLOR](irc as IRibbonControl)
   Select Case ird.id
      Case "[COLOR="Blue"]btnHideFormA[/COLOR]"
         If CurrentProject.AllForms("FormA").IsLoaded Then Forms("FormA").Visible = False
      Case Else
         [COLOR="Green"]'...[/COLOR]
   End Select
End Sub
Hope this helps,
 
Thanks Mark,
 

Users who are viewing this thread

Back
Top Bottom