Is form opened as subform?
You can have a form which can be opened as standalone, and as a subform in other form. In second case you could need a reference to parent form to pass it some results, or hide some controls when form is a subform. So you need to know - how form is loaded? Use a SysCmd function to do this:
If SysCmd(acSysCmdGetObjectState, acForm, Me.Name) = 0 Then
'Form loaded as a subform
...
Else
'Loaded stand-alone
....
End If
If SysCmd(acSysCmdGetObjectState, acForm, Me.Name) = 0 Then
'Form loaded as a subform
...
Else
'Loaded stand-alone
....
End If
0 Comments:
Post a Comment
<< Home