Home All Groups Group Topic Archive Search About

expressions blocked inconsistently

Author
9 Feb 2009 5:20 PM
Raydar
An Access 2003 database I've been creating suffers from blocked expressions,
but differently on different machines that have the same Macro Security
settings.

On most of the machines I've tried, at work, home, & friends' homes--all
running Office 2003 in WinXP or Win7b--I get unpopulated form fields &
various error
boxes when fields are referenced in my VBA code, UNLESS Macro Security is
set to "Low." But on my main work computer, I can leave Macro Security set to
"Medium" and the expressions which are blocked on all the other machines
(when their Macro Security is set to "Medium") are NOT blocked.

One MS Access help document says expression blocking can be gotten around by
using the expressions in VBA instead of in regular Access design-view
elements;
but I've done that in all seemingly relevant places, and put "Public" in
every single VBA procedure declaration, and I still get errors that seem to
owe to
expression blocking unless I set Macro Security to "Low," again with the
strange exception of my main work computer.

My questions, if any kind soul can answer:

(1) What could be responsible for my needing to set Macro Security to "Low,"
in order for expressions not to be blocked, on most but not all machines?

(2) What else can I try to defeat expression blocking, besides putting all
relevant expressions in VBA and making all function/subroutine declarations
public?

Thanks very much for any help!

Author
24 Feb 2009 3:19 PM
Raydar
I still haven't fount a solution to this.  Please, anyone?



Show quoteHide quote
"Raydar" wrote:

> An Access 2003 database I've been creating suffers from blocked expressions,
> but differently on different machines that have the same Macro Security
> settings.
>
> On most of the machines I've tried, at work, home, & friends' homes--all
> running Office 2003 in WinXP or Win7b--I get unpopulated form fields &
> various error
> boxes when fields are referenced in my VBA code, UNLESS Macro Security is
> set to "Low." But on my main work computer, I can leave Macro Security set to
> "Medium" and the expressions which are blocked on all the other machines
> (when their Macro Security is set to "Medium") are NOT blocked.
>
> One MS Access help document says expression blocking can be gotten around by
> using the expressions in VBA instead of in regular Access design-view
> elements;
> but I've done that in all seemingly relevant places, and put "Public" in
> every single VBA procedure declaration, and I still get errors that seem to
> owe to
> expression blocking unless I set Macro Security to "Low," again with the
> strange exception of my main work computer.
>
> My questions, if any kind soul can answer:
>
> (1) What could be responsible for my needing to set Macro Security to "Low,"
> in order for expressions not to be blocked, on most but not all machines?
>
> (2) What else can I try to defeat expression blocking, besides putting all
> relevant expressions in VBA and making all function/subroutine declarations
> public?
>
> Thanks very much for any help!
Author
25 Feb 2009 12:12 AM
Chris O'C via AccessMonster.com
1 - Some pcs have sandbox mode set to 2, others have changed the default to
something else.  Check the registry:

\\HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\SandboxMode

2 - When changing from medium to low macro security, a prompt asks "Unsafe
expressions are blocked....Do you want to allow the evaluation of potentially
unsafe expressions to be evaluated?"  When changing from low to medium, a
prompt asks "Do you want to block unsafe expressions?"

Slap every user who clicks "Yes" and say "That's why my app's expressions are
blocked on your pc".  If that doesn't work, take away their mice.

Chris


Raydar wrote:
>I still haven't fount a solution to this.  Please, anyone?
>
>> (1) What could be responsible for my needing to set Macro Security to "Low,"
>> in order for expressions not to be blocked, on most but not all machines?
>>
>> (2) What else can I try to defeat expression blocking, besides putting all
>> relevant expressions in VBA and making all function/subroutine declarations
>> public?

Author
27 Feb 2009 5:16 PM
Raydar
Thanks, Chris

I may need to slap myself to get reality back: I did find that registry
sandbox setting at 2 on the machines that were refusing to let my expressions
work, but when I checked the machine that has never given me trouble with
them, its registry sandbox setting was 3. 

Because there'll be no more than 10 - 15 users at maximum, it's probably not
going to be a big deal to get everyone to set Access' macro security to low
or even set their registry sandbox values to 0.  I just wish I could achieve
what Access' help dox mention, namely being able to get around sandbox mode
by putting my code in the right places.

Also, on the machines that were blocking my expressions, when I set their
registry sandbox values to 0, Access overrode that setting according to the
Macro Security setting within Access.  Gol-darnit.  :)


Show quoteHide quote
"Chris O'C via AccessMonster.com" wrote:

> 1 - Some pcs have sandbox mode set to 2, others have changed the default to
> something else.  Check the registry:
>
> \\HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\SandboxMode
>
> 2 - When changing from medium to low macro security, a prompt asks "Unsafe
> expressions are blocked....Do you want to allow the evaluation of potentially
> unsafe expressions to be evaluated?"  When changing from low to medium, a
> prompt asks "Do you want to block unsafe expressions?"
>
> Slap every user who clicks "Yes" and say "That's why my app's expressions are
> blocked on your pc".  If that doesn't work, take away their mice.
>
> Chris
>
>
> Raydar wrote:
> >I still haven't fount a solution to this.  Please, anyone?
> >
> >> (1) What could be responsible for my needing to set Macro Security to "Low,"
> >> in order for expressions not to be blocked, on most but not all machines?
> >>
> >> (2) What else can I try to defeat expression blocking, besides putting all
> >> relevant expressions in VBA and making all function/subroutine declarations
> >> public?
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200902/1
>
>
Author
2 Mar 2009 10:03 PM
Chris O'C via AccessMonster.com
When sandbox mode is 0, it's disabled for all Office apps, not just Access.
If you keep it on 2, it's disabled for Access but enabled for the targets of
most macro viruses:  Word and Excel.

I'd recommend you keep sandbox mode on 2 so it doesn't interfere with your
Access app, but protects you from harmful macros in your other Office apps.

"Also, on the machines that were blocking my expressions, when I set their
registry sandbox values to 0, Access overrode that setting according to the
Macro Security setting within Access."

The macro security level doesn't change or override your sandbox mode.  The
things that are affecting your sandbox mode registry setting are:

1 - group policy settings from the network admin (they can override your
settings - you'll know because your changes won't save).
2 - clicking on the yes or no button when asked if you want to block unsafe
expressions.
3 - your manual changes to the registry for sandbox mode.

Chris


Raydar wrote:

Show quoteHide quote
>I may need to slap myself to get reality back: I did find that registry
>sandbox setting at 2 on the machines that were refusing to let my expressions
>work, but when I checked the machine that has never given me trouble with
>them, its registry sandbox setting was 3. 
>
>Because there'll be no more than 10 - 15 users at maximum, it's probably not
>going to be a big deal to get everyone to set Access' macro security to low
>or even set their registry sandbox values to 0.  I just wish I could achieve
>what Access' help dox mention, namely being able to get around sandbox mode
>by putting my code in the right places.
>
>Also, on the machines that were blocking my expressions, when I set their
>registry sandbox values to 0, Access overrode that setting according to the
>Macro Security setting within Access.  Gol-darnit.  :)

Author
3 Mar 2009 6:01 PM
Raydar
Thanks, Chris--the group policy factor might just be the thing responsible
for the seemingly inconsistent behavior. 


Show quoteHide quote
"Chris O'C via AccessMonster.com" wrote:

> When sandbox mode is 0, it's disabled for all Office apps, not just Access.
> If you keep it on 2, it's disabled for Access but enabled for the targets of
> most macro viruses:  Word and Excel.
>
> I'd recommend you keep sandbox mode on 2 so it doesn't interfere with your
> Access app, but protects you from harmful macros in your other Office apps.
>
> "Also, on the machines that were blocking my expressions, when I set their
> registry sandbox values to 0, Access overrode that setting according to the
> Macro Security setting within Access."
>
> The macro security level doesn't change or override your sandbox mode.  The
> things that are affecting your sandbox mode registry setting are:
>
> 1 - group policy settings from the network admin (they can override your
> settings - you'll know because your changes won't save).
> 2 - clicking on the yes or no button when asked if you want to block unsafe
> expressions.
> 3 - your manual changes to the registry for sandbox mode.
>
> Chris
>
>
> Raydar wrote:
>
> >I may need to slap myself to get reality back: I did find that registry
> >sandbox setting at 2 on the machines that were refusing to let my expressions
> >work, but when I checked the machine that has never given me trouble with
> >them, its registry sandbox setting was 3. 
> >
> >Because there'll be no more than 10 - 15 users at maximum, it's probably not
> >going to be a big deal to get everyone to set Access' macro security to low
> >or even set their registry sandbox values to 0.  I just wish I could achieve
> >what Access' help dox mention, namely being able to get around sandbox mode
> >by putting my code in the right places.
> >
> >Also, on the machines that were blocking my expressions, when I set their
> >registry sandbox values to 0, Access overrode that setting according to the
> >Macro Security setting within Access.  Gol-darnit.  :)
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200903/1
>
>
Author
24 Feb 2009 10:31 PM
Gina Whipp
Raydar,

Okay, let me give this a shot...

1. Do all the machines have the updates installed?  Because I THINK it ws
the Jet 4.0 that started this.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Show quoteHide quote
"Raydar" <Ray***@discussions.microsoft.com> wrote in message
news:7E416418-BAD0-4BF7-8838-8132911FFF73@microsoft.com...
> An Access 2003 database I've been creating suffers from blocked
> expressions,
> but differently on different machines that have the same Macro Security
> settings.
>
> On most of the machines I've tried, at work, home, & friends' homes--all
> running Office 2003 in WinXP or Win7b--I get unpopulated form fields &
> various error
> boxes when fields are referenced in my VBA code, UNLESS Macro Security is
> set to "Low." But on my main work computer, I can leave Macro Security set
> to
> "Medium" and the expressions which are blocked on all the other machines
> (when their Macro Security is set to "Medium") are NOT blocked.
>
> One MS Access help document says expression blocking can be gotten around
> by
> using the expressions in VBA instead of in regular Access design-view
> elements;
> but I've done that in all seemingly relevant places, and put "Public" in
> every single VBA procedure declaration, and I still get errors that seem
> to
> owe to
> expression blocking unless I set Macro Security to "Low," again with the
> strange exception of my main work computer.
>
> My questions, if any kind soul can answer:
>
> (1) What could be responsible for my needing to set Macro Security to
> "Low,"
> in order for expressions not to be blocked, on most but not all machines?
>
> (2) What else can I try to defeat expression blocking, besides putting all
> relevant expressions in VBA and making all function/subroutine
> declarations
> public?
>
> Thanks very much for any help!
Author
27 Feb 2009 5:23 PM
Raydar
Thanks, Gina

Yes, all the machines in question have Jet 4.0--or at least the registry
lists Jet 4.0.

I tried changing the registry's default sandbox mode value per Chris O'C's
reply (see above--and oops, I replied to my own message instead of his;
darn!), so what I say there may help you tell what's going on.

Since Access' help dox indicate that using VBA gets one around the sandbox
barrier, I'd love it if there were an efficient way to determine precisely
what expression is the problem . . . 'cause as far as I know, I've used VBA
for everything relevant.

Show quoteHide quote
"Gina Whipp" wrote:

> Raydar,
>
> Okay, let me give this a shot...
>
> 1. Do all the machines have the updates installed?  Because I THINK it ws
> the Jet 4.0 that started this.
>
> --
> Gina Whipp
>
> "I feel I have been denied critical, need to know, information!" - Tremors
> II
>
> http://www.regina-whipp.com/index_files/TipList.htm
>
> "Raydar" <Ray***@discussions.microsoft.com> wrote in message
> news:7E416418-BAD0-4BF7-8838-8132911FFF73@microsoft.com...
> > An Access 2003 database I've been creating suffers from blocked
> > expressions,
> > but differently on different machines that have the same Macro Security
> > settings.
> >
> > On most of the machines I've tried, at work, home, & friends' homes--all
> > running Office 2003 in WinXP or Win7b--I get unpopulated form fields &
> > various error
> > boxes when fields are referenced in my VBA code, UNLESS Macro Security is
> > set to "Low." But on my main work computer, I can leave Macro Security set
> > to
> > "Medium" and the expressions which are blocked on all the other machines
> > (when their Macro Security is set to "Medium") are NOT blocked.
> >
> > One MS Access help document says expression blocking can be gotten around
> > by
> > using the expressions in VBA instead of in regular Access design-view
> > elements;
> > but I've done that in all seemingly relevant places, and put "Public" in
> > every single VBA procedure declaration, and I still get errors that seem
> > to
> > owe to
> > expression blocking unless I set Macro Security to "Low," again with the
> > strange exception of my main work computer.
> >
> > My questions, if any kind soul can answer:
> >
> > (1) What could be responsible for my needing to set Macro Security to
> > "Low,"
> > in order for expressions not to be blocked, on most but not all machines?
> >
> > (2) What else can I try to defeat expression blocking, besides putting all
> > relevant expressions in VBA and making all function/subroutine
> > declarations
> > public?
> >
> > Thanks very much for any help!
>
>
>