BorderStyle and DoCmd.OpenForm

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
 
S

Stuart McCall

You could simulate the acDialog effect like this:

DoCmd.OpenForm "frmPopup", , , , acFormReadOnly
Do
DoEvents
Loop Until SysCmd(acSysCmdGetObjectState, acForm, "frmPopup") = 0
 
D

Darinka

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top