Modal property

S

slickdock

I need to temporarily change the property of a modal form to not modal with a
macro. I tried a similar technique that I use for setting visibility, but it
didn't work:

Macro command: SetValue
Item: [forms]![myform]![mycontrol].[visible]
Expression: False

TIA.
 
S

Stuart McCall

slickdock said:
I need to temporarily change the property of a modal form to not modal with
a
macro. I tried a similar technique that I use for setting visibility, but
it
didn't work:

Macro command: SetValue
Item: [forms]![myform]![mycontrol].[visible]
Expression: False

TIA.

Can't be done, at least not the way you want it. From the help file:

Setting the Modal property to Yes makes the form modal only when you:
a.. Open it in Form view from the Database window.
b.. Open it in Form view by using a macro or Visual Basic.
c.. Switch from Design view to Form view.
In other words, the property can only be changed in form design view (and
for that you don't need code anyway - just set it in the property sheet)
 
M

Mr. B

Stewart,

Your take on setting the Model property is just not accruate.

I have tested it, and did so before posting my previous comment, and the
property can be changed through both VBA code or a Macro when opening the
form in form view.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm


Stuart McCall said:
slickdock said:
I need to temporarily change the property of a modal form to not modal with
a
macro. I tried a similar technique that I use for setting visibility, but
it
didn't work:

Macro command: SetValue
Item: [forms]![myform]![mycontrol].[visible]
Expression: False

TIA.

Can't be done, at least not the way you want it. From the help file:

Setting the Modal property to Yes makes the form modal only when you:
a.. Open it in Form view from the Database window.
b.. Open it in Form view by using a macro or Visual Basic.
c.. Switch from Design view to Form view.
In other words, the property can only be changed in form design view (and
for that you don't need code anyway - just set it in the property sheet)
 
S

Stuart McCall

The key phrase there is 'when opening the form in form view'. That's not
what the OP wants (as I understand it). He wants to temporarily alter the
property once the form is open, or at least that's how it sounded to me...

Mr. B said:
Stewart,

Your take on setting the Model property is just not accruate.

I have tested it, and did so before posting my previous comment, and the
property can be changed through both VBA code or a Macro when opening the
form in form view.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm


Stuart McCall said:
slickdock said:
I need to temporarily change the property of a modal form to not modal
with
a
macro. I tried a similar technique that I use for setting visibility,
but
it
didn't work:

Macro command: SetValue
Item: [forms]![myform]![mycontrol].[visible]
Expression: False

TIA.

Can't be done, at least not the way you want it. From the help file:

Setting the Modal property to Yes makes the form modal only when you:
a.. Open it in Form view from the Database window.
b.. Open it in Form view by using a macro or Visual Basic.
c.. Switch from Design view to Form view.
In other words, the property can only be changed in form design view (and
for that you don't need code anyway - just set it in the property sheet)
 
S

Stuart McCall

Mr. B said:
Stewart,

Your take on setting the Model property is just not accruate.

You're right. Please ignore my post.

(I'm sure this wasn't allowed in at least one version...)
 
M

Mr. B

Yes, Stewart, I was also thinking that it could not be done. It seemed to me
that some time in the distant past (and I know distant past, LOL) you could
not set this property except in design mode. Then, on the other hand, I
can't say for sure.

Oh, well, as long as we know how we can use it now. That's the most
important thing.

By the way, I was not trying to be smart, I just wanted the OP to know that
it could be done.

Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 
S

slickdock

Thank you both. I simply had a bang instead of a period in my value field. It
does work, even for my distributed runtime version. The end user's code
temporarily sets the modal value of the form to false, then returns it to
true upon completion of my behind the scenes calculation.
 

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