For a Project running under Access 2003 I have a Form that is normally set modeless, but in some cases is opened as acDialog and thusly modal.
This Form now needs to check if itself is Modal or not to modify its behaviour upon button-click accordingly.
Me.Form.Modal
only returns the Property-Value specified in Design-mode, not the current state.
I have found a similar answer for VB that suggests using the GetWindowLong API-Call to "user", but this does not translate to VBA (Microsoft KnowledgeBase 77316), I am afraid: Access2003 cannot find the 'user'-file.
In short: Is there a reliable way to determine if a Form itself is modal or modeless from within this form?
TIA.
Edit: I seem to remember that Me.Form is actually equivalent to just Me. As far as I recall, The Form Property is the default one, so if you omit it it is assumed. Regardless, both Me.Modal and Me.Form.Modal deliver the value 'false' regardless of the way the Form was opened.