Some VBA Code Disabled in Access 2003.

J

JadeTiger

Hi,

I've got a problem where when I open MS Access, it does not display some of
the SQL results in my search form. The Control, (a list box), on the form
uses the SQL statement as its row source.

All was running well until I got the Sandbox security notification. I have
tried to change the Macro Secutity settings, however this does not seem to
help.

Does anyone have any ideas?
 
C

Chris O'C via AccessMonster.com

Tools > macro > security. Click on "low".

The prompt asks "Do you want to allow the evaluation of potentially unsafe
expressions?"

What this means in English is "Do you want to go into Sandbox mode?" If you
click on the yes button, some of your code won't run because it's not "safe"
enough. Access won't tell you it didn't run either.

If you click on the no button, you won't stay in Sandbox mode and your code
runs because Access/Jet doesn't get to decide if the code is safe or not.

Chris
 
J

JadeTiger

Thanks for the reply Chris.

I've looked still further into this and it appears that any control whose
list source, (list box, combo box), is based on an SQL statement is affected.
The strange thing is that it is only with reference to one field in the
underlying table that it behaves like this.

Further confusing the matter is that the code still works, (in the case of
the list box), but in the results to the SQL statement for that field are not
displayed, just blank. But for the combo box, the field is again blank, but
the combo will not allow any selections to be made.

I run this application of 5 other workstations and it resides on our
network, and it is only on my machine that I have this symptom. It is really
annoying because the field that won't display is the client name field which
is what you need to search by in 9 out of 10 cases!! Arrgghh!!!

I've also tried uninstalling Access and reinstalling it but it does appear
that some components are left in the registry even after the uninstall and
upon reinstall it just goes back to the same behaviour.

Sorry to be longwinded but this seems to be a very specific problem. I know
that it must be a setting somewhere within Access because no-one else has
this problem. I have witnessed it in Access 2000 & 2003.

Please someone help!!!
 
C

Chris O'C via AccessMonster.com

You picked the "yes" button button when asked if you want to use sandbox mode.
The users on the other 5 workstations picked the "no" button. That's why
yours is different.

Go into your registry and find this hive:

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

Change the value to 2.

Chris
 
C

Chris O'C via AccessMonster.com

"The users on the other 5 workstations picked the "no" button."

Or they left it at the factory default and didn't dicker with the macro
security level, so they didn't get prompted for whether they wanted to
evaluate unsafe expressions (which is sandbox mode).

Chris
 
J

JadeTiger

And here's the punch line, I don't have a SandboxMode folder in that part of
the Registry! I should have mentioned that before becuase i'd read a lot of
the threads here and it was mentioned. Don't ask me why it isn't there, but
it just isn't.

Any ideas?

By the way, thanks for taking the time to reply, I really appreciate your
help.
 
J

JadeTiger

Scratch that last. I was looking for another folder!

I found it, but the value was already 2. The hexadecimal option button was
selected. Should I change it to decimal? That's thye only other option I have.
 
C

Chris O'C via AccessMonster.com

Hexadecimal 2 equals 2 in the decimal number system too. Leave it the way it
is.

Chris
 
C

Chris O'C via AccessMonster.com

You said at the start "All was running well until I got the Sandbox security
notification."

Access doesn't just decide "It's Tuesday, time to pop up a sandbox security
notification for this user". Can you describe what you were doing and why
you think you needed to change the sandbox mode setting? Can you remember
what this notification said?

Chris
 

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