isladogs
Access MVP / VIP
- Local time
- Today, 16:03
- Joined
- Jan 14, 2017
- Messages
- 19,393
I'm bemused by this thread and disagree with the comments above so I tested for myself on an unbound form in Access 365:Solution thanks to MajP, who is much more experienced then I am. If you type Form_FormName.TxtTest = "Hallo" into the immediate window, this will open (apearantly) a Hidden instance of the form. When you open the form from the nav pane, another instance (..may be not the correct word, don't kill me please..) of the form is opened. Type Form_FormName.visible = True and you will see two times the same form. Like with a real magician, the magic wasn't realy magic. I still think you can use this to store Public variables, with a bound form they will be still there after closing the database. But i didn't test this yet..
1. To check that the form is closed initially, I first typed ?CurrentProject.AllForms ("Form1").IsLoaded in the immediate window. It returned False
2. Next I typed Form_Form1.txt1="Hello" in the immediate window followed by ?CurrentProject.AllForms ("Form1").IsLoaded again which now returns True.
In other words, entering 'data' as shown loads the form. It does not appear to open the form hidden.
2. Finally, I typed Form_Form1.Visible=True => ONE copy of the form opens
Leaving aside the fact that unbound forms are of limited use, that 'data' is of course lost when the form is closed and reopened.
So you cannot use this to store public variables even whilst the database is open ... let alone when the database is closed & reopened.
So does it have any practical use? Not as far as I can tell
Much too easy!Cool! I like a challenge!
Here's one for you, open a form with a combobox on it. And in the process of opening, have the combo open up ready for the user to make a selection....
Or try this. Its a puzzle where the answer is supplied - in this case I'd like an explanation of why it works:
A Complex Deep Hidden Attachment Mystery
This is the fifth in a series of security challenges. In this case, a problem occurs when deep hiding attachment fields and a solution is provided. But why does the solution work?
Last edited: