Macro Error Messages

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Macro Error Messages

Post by aardvark »

Good morning all,

I have this Access 2000 Format database app running in Access 2007. In my macros, I receive these messages in design view: "This action will not be allowed if the database is not trusted". It occurs on the SetWarnings Action and the Close Action when I try to close a table and not save. The database location is set as a trusted location and all macros are enabled. What else needs to be set? TIA for any and all ideas.

Bill Kessinger

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Macro Error Messages

Post by HansV »

Have you made sure that the folder containing the database is a trusted location for Access 2007? Each Office application has its own settings, so assigning a trusted location for Excel will not affect Access.
If you have, try removing the trusted location then adding it again. I've heard about it taking a try or two before it "took".
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Macro Error Messages

Post by aardvark »

Hi Hans,

Thanks for the quick response. I'm running this app in 2007 and the location is set to be trusted. I've tried this about 4 or 5 times. I may have to convert the db to 2007.

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Macro Error Messages

Post by HansV »

No, it shouldn't be necessary to convert to Access 2007 format. I just tested with a database in Access 2000 format. The warnings are just that - they tell you that IF someone opens your database in an untrusted location, some actions will be disabled. The actions will run OK in a trusted location.
x112.jpg
Have you tried running the macro?
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Macro Error Messages

Post by aardvark »

I ran this one with the close action and the save set to NO.
Macro.JPG
The table did not close.
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Macro Error Messages

Post by HansV »

That's puzzling - everything I can find suggests that such actions should run if the database is in a trusted location, and it works for me that way.

Could you perhaps try it with a simple macro with just one or two actions, and report what happens? Thanks in advance.
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Macro Error Messages

Post by aardvark »

Well, DOOFUS Bill :bash: figured out his problem: I was closing the wrong table. All works well now.

I did notice that the SetWarnings Action is not in the Action list in 2007.

Thanks for your help as always.

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Macro Error Messages

Post by HansV »

By default, only "safe" actions are displayed in the dropdown list.
The "Show All Actions" button in the Design tab of the ribbon toggles the potentially unsafe actions on/off:
x113.jpg
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

aardvark
Lounger
Posts: 47
Joined: 09 Feb 2010, 11:30
Location: OH USA

Re: Macro Error Messages

Post by aardvark »

Thanks again.