I am making use of a global variable in order to prevent individual forms from being non-programitaically opened.
Prior to opening any form I set:
And in the Open event of the Forms, I code:
In the Form's Open event.
I have need of creating a more complicated subform which I would like to prevent from being opened non-programitaically.
Any suggestions how I could implement such within a subform context? TIA!
Prior to opening any form I set:
Code:
'Open the projects window and exit
flgInitArchitecture = True
DoCmd.OpenForm strDocName
DoCmd.Close acForm, Me.Name
Code:
'Test if this form is being opened programatically vs manually
If architecturecheck_CheckHowStarted() = 0 Then
'Caught someone being sneeky... we outtahere!
Cancel = True
End If
I have need of creating a more complicated subform which I would like to prevent from being opened non-programitaically.
Any suggestions how I could implement such within a subform context? TIA!