Create a form to enter report criteria macro troubles

G

Guest

When following the directions from the Access 2003 Help files on "Create a
form to enter report criteria", I cannot get the macro that the Access help
files documentation recommends to create for the "OK button" to run.
According to this help document, the macro utilizes the SetValue action to
hide the unbound "dialog form", which the same document says to create to
select parameters for a specified report. In the "Create a form to enter
report criteria" document this is item # 5, "Create a macro for the OK
button", which is located below item # 3, "Create a macro that opens the
Sales Dialog form".
When I set the Item in the Argument for this SetValue action as [Visible],
with the Expression as "No", I'm getting an error message that says "You
entered an expression that has an invalid reference to the property Visible.
The property may not exist or may not apply to the object you specified."
When I set the Item as [Forms]![SALES DIALOG].[Visible], and keeping the
Expression as 'No", I get a message that says "Access failed to evaluate one
or more expressions because 'Visible' was referenced in an expression. Only
functions and properties that are considered to be safe are allowed in
expressions when Access runs in Sandbox mode."
I checked the Macro Security and saw where it is set to Medium and assume
that this means that the Sandbox Mode has been enabled. Would setting Macro
Security to Low, so that the Sandbox Mode can be disabled, allow the maro to
work?
Thanks,
RC
 
S

Steve Schapel

RC,

Yes, I think setting the Macro Security to Low will fix this. Another
solution would be to use a VBA procedure instead of a macro to hide the
form.
 
G

Guest

Hi,

I have the same problem however I am unable to alter the macro security
level due to network restrictions. Is there another way I could do this? My
VB skills are non existant.

Ian


Steve Schapel said:
RC,

Yes, I think setting the Macro Security to Low will fix this. Another
solution would be to use a VBA procedure instead of a macro to hide the
form.

--
Steve Schapel, Microsoft Access MVP

When following the directions from the Access 2003 Help files on "Create a
form to enter report criteria", I cannot get the macro that the Access help
files documentation recommends to create for the "OK button" to run.
According to this help document, the macro utilizes the SetValue action to
hide the unbound "dialog form", which the same document says to create to
select parameters for a specified report. In the "Create a form to enter
report criteria" document this is item # 5, "Create a macro for the OK
button", which is located below item # 3, "Create a macro that opens the
Sales Dialog form".
When I set the Item in the Argument for this SetValue action as [Visible],
with the Expression as "No", I'm getting an error message that says "You
entered an expression that has an invalid reference to the property Visible.
The property may not exist or may not apply to the object you specified."
When I set the Item as [Forms]![SALES DIALOG].[Visible], and keeping the
Expression as 'No", I get a message that says "Access failed to evaluate one
or more expressions because 'Visible' was referenced in an expression. Only
functions and properties that are considered to be safe are allowed in
expressions when Access runs in Sandbox mode."
I checked the Macro Security and saw where it is set to Medium and assume
that this means that the Sandbox Mode has been enabled. Would setting Macro
Security to Low, so that the Sandbox Mode can be disabled, allow the maro to
work?
Thanks,
RC
 

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