GK in the UK
Registered User.
- Local time
- Today, 18:52
- Joined
- Dec 20, 2017
- Messages
- 281
Is there a method for an open form to get the name of the calling form, so that it can read some parameters from the calling form ?
I can't use OpenArgs as the form is already open.
The open form may be called from different 'hosts'
There may be an additional complication. Although I haven't implemented it yet, the called form may be opened as a new instance from a different host form at the same time.
So the instance of the called form needs to be able to read the actual name of the form that called it.
The purpose is for the called form to read some parameters from the calling form, when the current event fires (because the called form was refreshed with a different record).
So sort of like OpenArgs but really I want CurrentArgs.
I found this old thread
https://www.tek-tips.com/viewthread.cfm?qid=88008
but it doesn't work because the called form looks for the name of the calling form before the code SetForm.Me executes to push the name into the sub. Unless I'm doing it wrong.
I can't use OpenArgs as the form is already open.
The open form may be called from different 'hosts'
There may be an additional complication. Although I haven't implemented it yet, the called form may be opened as a new instance from a different host form at the same time.
So the instance of the called form needs to be able to read the actual name of the form that called it.
The purpose is for the called form to read some parameters from the calling form, when the current event fires (because the called form was refreshed with a different record).
So sort of like OpenArgs but really I want CurrentArgs.
I found this old thread
https://www.tek-tips.com/viewthread.cfm?qid=88008
but it doesn't work because the called form looks for the name of the calling form before the code SetForm.Me executes to push the name into the sub. Unless I'm doing it wrong.