Pyro
Too busy to comment
- Local time
- Tomorrow, 09:24
- Joined
- Apr 2, 2009
- Messages
- 127
Hello,
I have spent a couple of hours now playing around with this, and i can't seem to get it to work.
I am just trying to make any open forms invisible when the button is pressed. I have tried Eval() which does nothing. Any help would be received with relief!
I have spent a couple of hours now playing around with this, and i can't seem to get it to work.
Code:
'callback for OnButtonPress
Public Sub OnButtonPress(ctl As IRibbonControl)
Dim obj As Object
Dim StrName As String
If CurrentProject.AllForms(ctl.Tag).IsLoaded Then
'Do nothing
Else
For Each obj In Application.CurrentProject.AllForms
If CurrentProject.AllForms(obj.Name).IsLoaded Then
strName = strName & "Forms!" & obj.Name & ".Visible = False"
*run this string* (strName)
End If
strName = ""
Next obj
DoCmd.OpenForm ctl.Tag
End If
End Sub
I am just trying to make any open forms invisible when the button is pressed. I have tried Eval() which does nothing. Any help would be received with relief!