2003 Upgrading no longer accepts the Visible reference in an expre

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I'm supporting a large Access database that is about 7 years old and has
been upgraded many times, which never seems to go smoothly. To print reports
with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an error
pops up saying "Access failed to evaluate one or more expressions because
"Visible" was referenced in the expression." It goes on a bit about how it
maybe unsafe. How do I fix this? Do I need to rewrite all of the macros and
code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
Lisa,

Try going to the Tools|Macro|Security menu and setting the option to Low.
 
Thanks for responding Steve. I do not see the option for Security under
macros. Am I looking in the wrong place?
Lisa

Steve Schapel said:
Lisa,

Try going to the Tools|Macro|Security menu and setting the option to Low.

--
Steve Schapel, Microsoft Access MVP

Hello,

I'm supporting a large Access database that is about 7 years old and has
been upgraded many times, which never seems to go smoothly. To print reports
with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an error
pops up saying "Access failed to evaluate one or more expressions because
"Visible" was referenced in the expression." It goes on a bit about how it
maybe unsafe. How do I fix this? Do I need to rewrite all of the macros and
code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
Lisa,

Sounds like you have to manually add the command to the toolbar.

From the main menu, select Customize from the Tools menu.
Select the Commands tab, and then scroll down to Tools in the left hand
Categories list.
Back to the main menu (now in edit mode), click Tools and then Macro.
Find Security... in the right hand Commands list on the Customize
dialog, and drag it to the Tools|Macro sub-menu.
Close the Customise thing. You should then be able to use the
Macro|Security option from the Tools menu to set your security level to
Low.
 
It may also be this bug that MS reported earlier:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;841916

--

Ken Snell
<MS ACCESS MVP>


Steve Schapel said:
Lisa,

Try going to the Tools|Macro|Security menu and setting the option to Low.

--
Steve Schapel, Microsoft Access MVP

Hello,

I'm supporting a large Access database that is about 7 years old and has
been upgraded many times, which never seems to go smoothly. To print
reports with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an
error pops up saying "Access failed to evaluate one or more expressions
because "Visible" was referenced in the expression." It goes on a bit
about how it maybe unsafe. How do I fix this? Do I need to rewrite all
of the macros and code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
Thanks Ken, that looks like it exactly. Can you answer one more question
please? Do I put the code the specify in the macro giving the error or is it
called from somewhere else?

Ken Snell said:
It may also be this bug that MS reported earlier:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;841916

--

Ken Snell
<MS ACCESS MVP>


Steve Schapel said:
Lisa,

Try going to the Tools|Macro|Security menu and setting the option to Low.

--
Steve Schapel, Microsoft Access MVP

Hello,

I'm supporting a large Access database that is about 7 years old and has
been upgraded many times, which never seems to go smoothly. To print
reports with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an
error pops up saying "Access failed to evaluate one or more expressions
because "Visible" was referenced in the expression." It goes on a bit
about how it maybe unsafe. How do I fix this? Do I need to rewrite all
of the macros and code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
The function (VBA code) must be put in a regular module (name the module
something different from the name of the function). Then you'd replace the
macro action SetValue (for the Visible setting) with the RunCode to call
this function.

--

Ken Snell
<MS ACCESS MVP>

Lisa said:
Thanks Ken, that looks like it exactly. Can you answer one more question
please? Do I put the code the specify in the macro giving the error or is
it
called from somewhere else?

Ken Snell said:
It may also be this bug that MS reported earlier:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the
SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;841916

--

Ken Snell
<MS ACCESS MVP>


Steve Schapel said:
Lisa,

Try going to the Tools|Macro|Security menu and setting the option to
Low.

--
Steve Schapel, Microsoft Access MVP


Lisa wrote:
Hello,

I'm supporting a large Access database that is about 7 years old and
has
been upgraded many times, which never seems to go smoothly. To print
reports with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an
error pops up saying "Access failed to evaluate one or more
expressions
because "Visible" was referenced in the expression." It goes on a bit
about how it maybe unsafe. How do I fix this? Do I need to rewrite
all
of the macros and code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
Cheers, Ken. I wasn't aware of that KB article.

Mind you, same problem, different solution. I would still fix it myself
by setting macro security to Low ;-)
 
You know Ken, when I tried to modify the tools menu command, it did not have
a link Macro, which is weird since there is clearly an option for Macro on
the menu for Tools. Did I miss something when I installed Access?
Lisa
 
Hi Steve,
I figured out the toolbar problem. I decided to lower the security on the
macros so I don't have to hunt around and fix them all the way Ken described.
This database has been modified quite a bit (like changing all of the code I
wrote to macros) since I originally created it so I'm not sure how many of
these will be lurking out there. This fix should catch them all.

Thanks again.
Lisa
 
Thanks Ken,
I created the separate module as per the instructions you sent (thanks!),
but it kept coming up and saying that there were too many arguments when
there were only two, the form name and the true/false attribute. I think the
problem I was having was with declaring the file name as the rotten thing has
spaces in it. I tried SetVisible ([Forms]![fdlgCases by Date - Closed]),
false,
and SetVisible (Forms!"fdlgCases by Date - Closed"), false,
but it didn't like either. I'm going to Lower the security since that will
fix all of the macros that may have this value set. This is a standalone
database that is on it's way out so there won't be any problems with lowering
the security.

Thanks for your help.
Lisa

Ken Snell said:
The function (VBA code) must be put in a regular module (name the module
something different from the name of the function). Then you'd replace the
macro action SetValue (for the Visible setting) with the RunCode to call
this function.

--

Ken Snell
<MS ACCESS MVP>

Lisa said:
Thanks Ken, that looks like it exactly. Can you answer one more question
please? Do I put the code the specify in the macro giving the error or is
it
called from somewhere else?

Ken Snell said:
It may also be this bug that MS reported earlier:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the
SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;841916

--

Ken Snell
<MS ACCESS MVP>


Lisa,

Try going to the Tools|Macro|Security menu and setting the option to
Low.

--
Steve Schapel, Microsoft Access MVP


Lisa wrote:
Hello,

I'm supporting a large Access database that is about 7 years old and
has
been upgraded many times, which never seems to go smoothly. To print
reports with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an
error pops up saying "Access failed to evaluate one or more
expressions
because "Visible" was referenced in the expression." It goes on a bit
about how it maybe unsafe. How do I fix this? Do I need to rewrite
all
of the macros and code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
Steve Schapel said:
Cheers, Ken. I wasn't aware of that KB article.

Mind you, same problem, different solution. I would still fix it myself
by setting macro security to Low ;-)


No argument from me! < g >
 
Hi steve, lisa and ken ,how are you all, i found this post , i face the same
Problem like Lisa.
Steve i did the same like you said , but i found a new Problem when i wrote
the date range it is open amassege said(the Expression you Enteredhas a
function name thet....cant find).
thanks
 
Ken, if I am, in ignorance, breaking a Netiquette rule, by asking a question
on somebody else's question, please put me right. However, I think that you
may have the answer to a problem that I have been tearing my hair out about
for more than 2 weeks, and nobody else has been able to help me. I have
various questions about it in Macros, Reports, General Database Questions and
New Users.

My question is, can and should the WorkAround in the link you referred to,
be used for the same problem in Access 2007 (I have recently upgraded from
2003 to 2007 and, amongst many other things, I have changed my Sandbox
Registry Value from 3 to 2 to try to solve the problem, but without any
success)?

Sorry, Lisa. I hope you don't mind. However, it may help you when your
company upgrades to 2007.

Thanks, Ken for any reply

Ken Snell said:
It may also be this bug that MS reported earlier:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;841916

--

Ken Snell
<MS ACCESS MVP>


Steve Schapel said:
Lisa,

Try going to the Tools|Macro|Security menu and setting the option to Low.

--
Steve Schapel, Microsoft Access MVP

Hello,

I'm supporting a large Access database that is about 7 years old and has
been upgraded many times, which never seems to go smoothly. To print
reports with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an
error pops up saying "Access failed to evaluate one or more expressions
because "Visible" was referenced in the expression." It goes on a bit
about how it maybe unsafe. How do I fix this? Do I need to rewrite all
of the macros and code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
I have not worked very much with ACCESS 2007, so I cannot speak with
authority about its behavior (still working in 2003!).

What type of problem are you seeing in ACCESS 2007? When you experience the
problem?

Do you have the database in a Trusted Location?
--

Ken Snell
http://www.accessmvp.com/KDSnell/



Owl said:
Ken, if I am, in ignorance, breaking a Netiquette rule, by asking a
question
on somebody else's question, please put me right. However, I think that
you
may have the answer to a problem that I have been tearing my hair out
about
for more than 2 weeks, and nobody else has been able to help me. I have
various questions about it in Macros, Reports, General Database Questions
and
New Users.

My question is, can and should the WorkAround in the link you referred to,
be used for the same problem in Access 2007 (I have recently upgraded from
2003 to 2007 and, amongst many other things, I have changed my Sandbox
Registry Value from 3 to 2 to try to solve the problem, but without any
success)?

Sorry, Lisa. I hope you don't mind. However, it may help you when your
company upgrades to 2007.

Thanks, Ken for any reply

Ken Snell said:
It may also be this bug that MS reported earlier:

Microsoft Knowledge Base Artilce 841916
You may receive an error message when you run a macro that uses the
SetValue
action to set the Visible property of an object in Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;841916

--

Ken Snell
<MS ACCESS MVP>


Steve Schapel said:
Lisa,

Try going to the Tools|Macro|Security menu and setting the option to
Low.

--
Steve Schapel, Microsoft Access MVP


Lisa wrote:
Hello,

I'm supporting a large Access database that is about 7 years old and
has
been upgraded many times, which never seems to go smoothly. To print
reports with a date range, a macro is used in a form that calls
"[Screen].[ActiveForm].[Visible]". When trying to run this report, an
error pops up saying "Access failed to evaluate one or more
expressions
because "Visible" was referenced in the expression." It goes on a bit
about how it maybe unsafe. How do I fix this? Do I need to rewrite
all
of the macros and code that reference "Visible"?

Thanks for any help you can offer.
Lisa
 
Back
Top