Issue with MS Access 365 not releasing Forms from Forms collection

Anonymous
2025-04-02T12:15:56+00:00

I'm running MS Access Version 2502 (Build 18526.20168 Click-to-Run), Current Channel and I've noticed that in certain scenario Forms are not being removed from Forms collection.
If I create a new database with a single form called 'Form1' and add 2 public methods to it:

Public Sub Show()

Me.Visible = True

End Sub

Public Sub Hide()

Me.Visible = False

End Sub

then I add a Standard Module with the following code:

Public frm As Form_Form1


Public Sub Test()

Set frm = New Form_Form1

'frm.Show

Debug.Print Forms.Count

'frm.Hide

Set frm = Nothing

Debug.Print Forms.Count

End Sub

and slowly step through the code, first Debug.Print will show the count of 1 and the second goes back to 0 as expected.
But if I uncomment Show & Hide methods and step through the code again, the counter never clears.

Has that been already acknowledged, has anybody else experienced this issue?

Thanks

Microsoft 365 and Office | Access | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Newest
  1. Duane Hookom 26,935 Reputation points Volunteer Moderator
    2025-04-02T13:44:35+00:00

    I don’t believe Access forms support Show or Hide like forms in Excel. Why are you attempting to use this rather than simply setting the Visible property?

    Was this answer helpful?

    0 comments No comments