var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
how can I use the docmd.openform command to open a form as a popup?
The situation is the following. I want a form to open as popup only if a certain criteria is give. So how can I set the popup property?
Thanks in advance!
There is a property under the
OTHER Tab called Popup. Set it to yes or True
hmm. i need to do the changes programmatically. what you mean is set the property in the design view.?
thats not possible in my case, since i want the form to open as popup only if a certain criteria is meet.
In the form Open event put your check
If your Criteria Then
Haven't got time to think this one through fully but:
After the Docmd.openForm you have a string, normally the name of a form to open.
This can be set with a number of arguments: acNormal etc.
I would suggest a simple if then statement followed by the docmd.
If myConditions = true then
docmd. openform "myForm", acNormal, , , acFormAdd, acDialog, Me.Name
'Do nothing or open the form in a different way
The acDialog action make sthe form behave a bit like like a popup.
acdialog is what I have been looking for. Thanks a lot !