BorderStyle and DoCmd.OpenForm

  • Thread starter Thread starter Darinka
  • Start date Start date
D

Darinka

Hello,

I have an Access 2002 form that has been designed with the properties Pop
Up=Yes, Modal=Yes, Border Style=Sizable, Min Max Buttons=Both Enabled.

This form is called from another form with the following syntax:

DoCmd.OpenForm "frmPopup", , , , acFormReadOnly, acDialog

I need to open the form using the acDialog parameter to prevent the code
following the OpenForm command firing too early. It is only when "frmPopup"
is closed by the user that control should come back to the calling form.
However, in using acDialog I lose the ability to be able to re-size the pop-
up form. I would still like the border style to be sizable and the min max
buttons to be displayed.

Is there a way of achieving this?

Thanking you in advance,
Darinka
 
You could simulate the acDialog effect like this:

DoCmd.OpenForm "frmPopup", , , , acFormReadOnly
Do
DoEvents
Loop Until SysCmd(acSysCmdGetObjectState, acForm, "frmPopup") = 0
 
Just one thing I have noticed though - putting DoEvents into the Do Until
loop pushes CPU up to 100% and it just stays there until i close the form.
 
Back
Top