Security Warning opening Access 2003 db

J

Jim Bud

We have an Access 2003 (SP1) database on our network that is shared by
several people, when our users open the database they get the Security
Warning: “This file may not be safe if it contains code that was intended to
harm your computer. Do you want to open this file or cancel the operation?â€

Our macro security level is set to Medium and this is our default for all
installs and should remain that way. How is the best way to prevent this
warning from coming up on all of the users of this database?

Thanks!
 
J

Joan Wild

J

Joan Wild

Jim said:
Thanks Joan, one more question ...

In this FAQ on Macro Security in Access, which FAQ should I go to in
... http://office.microsoft.com/en-us/assistance/HA011225981033.aspx

Is it easy to create my own for this db and/or risky to do it myself
if I never have before?

You won't be able to use a self-cert as that would only work on your
computer. You may be able to obtain a certificate from your corporate
domain. See

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmart04/html/sa04d1.asp

Read through the FAQ as it should answer many of your questions. Plus there
are many links to get more information.
 
T

TC

Joan said:
You'll need to digitally sign the database.
(snip)

IMO the best way is to start the database via a script file which sets
the macro security level to low for that single invocation of Access.
This does not require a certificate, or a registry change, and it does
not affect any other database(s) - just the one being started by that
script.

Eg. in VBScript:

dim o
set o=createobject ("Access.Application")
o.automationsecurity=1 ' set macro security LOW.
o.opencurrentdatabase "full path to your database"
o.usercontrol=true
set o=nothing

TC
 
B

Bob Hughes

Joan,

Would you please explan where you put this code. I have some access 2K
programs and the company is slowly switching to 2003.

I use win 2K & Office 2K myself
Can I add this code on my system and move to company servers?

Bob
 
B

Bob Hughes

TC

Would you please explane where you put this code. I have some access 2K
programs and the company is slowly switching to 2003.

I use win 2K & Office 2K myself
Can I add this code on my system and move to company servers?

Bob
 
T

TC

1. Create a file called STARTME.VBS using a simple text editor such as
Microsoft Notepad.

2. Type in the following lines to that file. Make sure you replace
"C:/blah.mdb" with the full pathfilename of your database.

dim o
set o=createobject ("Access.Application")
o.automationsecurity=1
o.opencurrentdatabase "C:/blah.mdb"
o.usercontrol=true
o.visible=true
set o=nothing

3. Close the new file. Check that the file extension is .VBS, not .TXT.

Now double-click the file & see what happens. If your PC has VBScript
enabled, your database should start *without* the normal A23k security
warnings. If your PC does *not* have VBScript enabled - or it has a
virus checker that disables VBScript - then nothing will happen, or you
will get a warning message, or whatever.

This method (when it works) is waaaaaaaaaay easier that trying to sign
your database with a digitial certificate - the only other way of
suppressing the security warnings on a "per database" basis.

HTH,
TC
 
B

Bob Hughes

TC,

Thanks it works, but how do you handle a secure db and use the proper work
group.

Bob
 
T

TC

Oww! Good question. I can think of several ways - none of them very
attractive. Let me think about this tonight & get back to you tomorrow.

TC
(off for the day)
 
T

TC

Bob, it is surprisingly hard to use my technique on a secured database.

You need to:
(1) pass the /wrkgrp command-line parameter to Access,
(2) set the AutomationSecurity property, then
(3) open the database.

You can do (1) from a batch file, but not from VBScript. However, you
can only do (2) & (3) from VBScript - not from the batch file! So you
need a batch file which does (1), then calls the VBScript for (2) &
(3).

Unfortunately, there is a bug in Access whereby it does not update the
COM Running Object Table (ROT) until it has lost the focus once. This
makes it difficult for the VBScript to find the copy of Access that was
started by the batch file. And there is a nasty interaction with the
pop-up logon box ... :-((

I'm not sure I can spend much more (free) time on this. If I haven't
posted more information within the next 3 days, I have not found a
solution, or just run out of time.

Sorry I can't be more encouraging.

Cheers,
TC
 
T

TC

Hi Bob.

I have got this working, but I can tell you now, it is a very tough
little problem. And I can not test it fully because I do not have A2k3.
And there is a bit more code that would easily fit in a newsgroup post.
And I'm reluctant to make a rod for my back by providing a fairly
technical solution, which might not work in your environment, & result
in lots of further questions.

So I will *consider* providing that code to you, but you will have to
email me requesting it. I'm sure there's a reply-by-email button
somewhere in the new google groups interface.

Cheers,
TC
 
J

Jeff Conrad

Hi Bob.

I have got this working, but I can tell you now, it is a very tough
little problem. And I can not test it fully because I do not have A2k3.
And there is a bit more code that would easily fit in a newsgroup post.
And I'm reluctant to make a rod for my back by providing a fairly
technical solution, which might not work in your environment, & result
in lots of further questions.

So I will *consider* providing that code to you, but you will have to
email me requesting it. I'm sure there's a reply-by-email button
somewhere in the new google groups interface.

Hi TC,

I would be very interested to see this code as well. Curiosity you know. :)
I could even do some testing with a secured database on Access 2003
for you and let you know the results. If you would like, you can send
a message to the following address and indicate where to respond to.
Please put "Access Junkie" in the subject line as this is a "dump"
e-mail account for our office and receives hundreds of junk messages
every day. I will then be able to hopefully spot your message.
administrator
at
ernstbros
dot
com

Thanks for your time,
 
B

Bob Hughes

Hi TC,

I would be very interested to see this code as well. Curiosity you
know. :) I could even do some testing with a secured database on
Access 2003 for you and let you know the results. If you would like,
you can send a message to the following address and indicate where to
respond to. Please put "Access Junkie" in the subject line as this is
a "dump" e-mail account for our office and receives hundreds of junk
messages every day. I will then be able to hopefully spot your
message. administrator
at
ernstbros
dot
com

Thanks for your time,
TC,
It would be much better if you could send this to Jeff as I am not yet
running 2003. The company I am writting for is slowly switching to XP and
asking me questions.
I probably will have to bite the bullet and switch in the next few
months.

If you do send the code to me I could ask someone else to test it. You
just have to decode my email address in the heading by applying the
change in my signature.

Bob
 
T

TC

Hi Jeff

Bob now says that he is *not* yet using a23k and would not need the
code for several months! Hmm, mght have been nice to know that, before
I spent so much time on it :-(

Under the circumstances, I'm going to consider turing it into a
shrink-wrapped product. For that purpose I will get access to a sutabe
Access :), and do some thorough testing here.

If you want to know how to do it, the answer is (in one respect)
simple: start Access with the /wrkgrp switch, set the
AutomationSecurity property (as per many previous posts from me), then
open the secured database.

The devil, however, is in the detail! You need a method that:

(1) is easily customizable (as to the name & location of the workgroup
file & database);

(2) has absolutely no visual artifacts (eg. odd flashes) on the screen,
and

(3) works reliably in all possible configurations; (eg. specified db is
or sin't secured; specified wgf does or doesn't require a logon; user
actually cancels the logon, & so on)

Achieving thse three things is quite a tough trick.

I'll post back to this thread if & when I take it further.

Cheers,
TC
 
B

Bob Hughes

TC
Sorry about the misunderstanding.

Although I won't be running XP for a while, the company I program for is
slowly switching.

So if you had come up with something, I would have implimented it on their
site.

Bob
 
J

Jeff Conrad

Hi TC,

No problem.
I just thought I would extend the offer for some testing.
I was indeed curious about how all that would tie in together.

Any time you are interested to share, I'm all ears!
:)
 
B

Brendan Reynolds

Bob, you've mentioned 'XP'. The version of Access included in Office XP is
Access 2002, not Access 2003, and this whole issue is not relevant to Access
2002.
 
B

Bob Hughes

Okay,
Now I am really confused. I have heard all the following mentioned
Office 97, Office 2K, Office 2002, Office XP, Office 2003
Access 97, Access 2K, Access 2002, Access 2002, Access 2003

I feel realy dumb. I did not realize Office XP was Access 2002.
At any rate based on your statement I assume the security problem is not an
issue with Access 2002.

I am pretty sure the company I deal with is running windows XP with Office
2003 but I will not be able to check until tomorrow. At any rate they do
get the security warning.

Bob
 
B

Brendan Reynolds

It can be confusing. Officially, the version of Office released between
Office 2000 and Office 2003 is known as Office XP, but the individual
applications that make up that version of Office are known as Access 2002,
Word 2002, etc., not Access XP, Word XP, etc. Of course, that's just the
official line - in practise you'll often find people talking about 'Office
2002' and 'Access XP'. And then, of course, there's the potential confusion
between Office XP and Windows XP.

When answering a support call from an end-user, two of the first questions
we ask are 'what version of Windows are you using?' and 'what version of
Office are you using?'. Many times users have replied 'Windows 97' and
'Office 98'.
 

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