Question Getting security warning on Open of database

lution

Registered User.
Local time
Yesterday, 18:09
Joined
Mar 21, 2007
Messages
114
I'm using Access 2007 sp1 on Vista and noticed something this morning when I created a new (completely empty) database - after closing the database and reopening it, I get the security warning that there is a macro in the database. If I tell Access I trust the database and open it, I can't find a macro or any vba code. To make sure we're clear, all I did was create new database from the Microsoft menu and didn't add anything too it. This is a brand new database created from the default Access template on my system.

I've tried the same thing on a XP box and didn't have the problem so I copied the database from Vista to XP and I see the same error there.

Anyone have recommendations/thoughts on how I can figure out if my template's (and now all my datases) have been hit by something bad and how to get them cleaned up? I use Trend Micro Office Scan as my virus scanning software.

Thanks,
Lution
 
Here's a copy of the database.
 

Attachments

okay, the security warning - this:
sec01.png


is just a warning that certain options have been disabled (including VBA and certain macros) unless the database is either in a trusted location or that you click the Options button and enable or "Help Protect me..."

So, you will get this regardless of whether you actually HAVE something in your db that needs to be disabled.
 
Thanks for checking Bob. I'm in the middle of making a release build of my project and got worried my system was infected with something I couldn't find or detect.

Safe travels
Lution
 
Bob, I understand what it is. Is there any way to stop it from asking every time? THanks
 
Hi

is thus something to do with the security level of access ie low, medium, high etc?

If so, I have a bit of code that sets the security to low when your app starts while keeping the general settings as normal in the sense of your settings might be on medium but your app would be low thus allowing things to run


Nidge
 
Many thanks to Bob's fix for this minor but annoying issue.
 
Well, thats how it goes Bob :)

my suggestion was going to be this
Code:
Public Sub SetSecurityOps()
    On Error GoTo setsecurityops_err
    Dim x
    Set x = CreateObject("access.application")
    x.AutomationSecurity = msoAutomationSecurityLow
    Set x = Nothing
    Exit Sub
    
setsecurityops_err:
    MsgBox ("A security error has prevented this application from running" & _
 vbCrLf & vbCrLf & _
    "please contact the Support team"), vbOKOnly, "Error"
    
    Application.Quit

End Sub

This is the 2007 version

the 2003 version is
Code:
Public Sub SetSecurityOps()
    On Error GoTo setsecurityops_err
    Dim x
    Set x = CreateObject("access.application")
    x.AutomationSecurity = 1
    Set x = Nothing
    Exit Sub
    
setsecurityops_err:
    MsgBox ("A security error has prevented this application from running" & _
 vbCrLf & vbCrLf & _
    "please contact the Support team"), vbOKOnly, "Error"
    
    Application.Quit

End Sub


regs


Nidge
 

Users who are viewing this thread

Back
Top Bottom