popup property can't be changed at run-time?

J

Jesse Aufiero

I have a form that needs to be displayed as a sizable, non-modal form. at
various times i also need to call this form up as a non-sizable, modal,
popup form. however, i can't seem to change the 'popup' property of the
form at run-time. how then can i call the form in these two different ways?

Thanks!
 
K

Klatuu

You can use the Dialog setting of the Window Mode argument of the OpenForm
method to open a form with its PopUp and Modal properties set to Yes.

Set the properties to the normal state in design view
Use the WindowsMode argument of the OpenForm method to control that.
When you want it to be normal
Docmd.OpenForm "MyForm", , , , , acWindowNormal
When you want the PopUp version
Docmd.OpenForm "MyForm", , , , , acDialog
 
J

Jesse Aufiero

problem is, i need to create an instance of the form via a module-scope
variable... so docmd.OpenForm won't work for me...
 
K

Klatuu

You will have to provide more detail. I don't really know what you mean.
You have to use an OpenForm to open the form, so I am really confused.

I think we can work this out, though.
 
J

Jesse Aufiero

here's an example of how i create a new instance of the form...

Dim Deals as Form (module scope)

Set Deals = New Form_frmDeals
Deals.NavigationButtons = False
Deals.AllowAdditions = False
Deals.Modal = True
Deals.RecordSource = "SELECT tblDeals.Date, tblDeals.[MOABSP#],
tblDeals.* FROM tblDeals WHERE tblDeals.DealID = " & Me![DealID] & ";"
Deals.Visible = True
Deals.cmdOpenCreatedBuyerConfirm.Enabled = False
Deals.cmdOpenCreatedSellerConfirm.Enabled = False
Deals.DisableConfirmCreateButtons
 
K

Klatuu

Okay, I see. You could still use the OpenForm method and do all the property
settings in the Load event of the form.

Jesse Aufiero said:
here's an example of how i create a new instance of the form...

Dim Deals as Form (module scope)

Set Deals = New Form_frmDeals
Deals.NavigationButtons = False
Deals.AllowAdditions = False
Deals.Modal = True
Deals.RecordSource = "SELECT tblDeals.Date, tblDeals.[MOABSP#],
tblDeals.* FROM tblDeals WHERE tblDeals.DealID = " & Me![DealID] & ";"
Deals.Visible = True
Deals.cmdOpenCreatedBuyerConfirm.Enabled = False
Deals.cmdOpenCreatedSellerConfirm.Enabled = False
Deals.DisableConfirmCreateButtons


Klatuu said:
You will have to provide more detail. I don't really know what you mean.
You have to use an OpenForm to open the form, so I am really confused.

I think we can work this out, though.
 

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