Hello All,
I have a few forms that are opened as achidden when the database opens and I have a few buttons that will change their property to visible and display the form as necessary.
However, I also have accesswindowhidden vba coding and I am looking to keep the visible forms visible while hiding the accesswindow.
I have procedures all over the place but essentially they check if the form is visible and then just open it or make it visible again:
Please use Code Tags
But it does not fire. I did a MSgBOX Forms!Clients.visible and it shows as False despite it being open and visible.
I also tried creating a textbox that will display the visibility of the form and linked that to the procedure event mentioned above but the forms show as not visible, again, despite being open and visible.
What am I missing? What can I check? Am I missing a property here?
This is what I have to open the form:
I have a few forms that are opened as achidden when the database opens and I have a few buttons that will change their property to visible and display the form as necessary.
However, I also have accesswindowhidden vba coding and I am looking to keep the visible forms visible while hiding the accesswindow.
I have procedures all over the place but essentially they check if the form is visible and then just open it or make it visible again:
Please use Code Tags
Code:
If [Forms]![Clients].visible = true then
DoCmd.OpenForm "Clients", acNormal, , , , acWindowNormal
[Forms]![Clients].Visible = True
End If
I also tried creating a textbox that will display the visibility of the form and linked that to the procedure event mentioned above but the forms show as not visible, again, despite being open and visible.
What am I missing? What can I check? Am I missing a property here?
This is what I have to open the form:
Code:
Clients_OnClick
Set rs = CurrentDb.OpenRecordset("SELECT * FROM ButtonClicks")
rs.AddNew
rs![ButtonClick] = Clients.Caption
rs![ClickTime] = Time()
rs![ClickDate] = Date
rs![User] = CurrentUser()
rs.Update
rs.Close
Set rs = Nothing
DoCmd.RunMacro "mcrHide"
If CurrentProject.AllForms("Mission Control").IsLoaded = True Then
DoCmd.OpenForm "Mission Control", acNormal
End If
If [Forms]![Employees].Visible = True Then
DoCmd.OpenForm "Employees", acNormal, , , , acWindowNormal
End If
If [Forms]![NewEmployeeForm].Visible = True Then
DoCmd.OpenForm "NewEmployeeForm", acNormal, , , , acWindowNormal
End If
If [Forms]![EAA - Database].Visible = True Then
DoCmd.OpenForm "EAA - Database", acNormal, , , , acWindowNormal
End If
[code]
[B][Forms]![Clients].Visible = True
[Forms]![Clients].SetFocus[/B]
End Sub
Any help would be greatly appreciated...been at this for a while and just found out that the reason its not firing is because it is not registering as visible.