Access Modules Won't Run Now

B

Billy

I moved my database file from one computer to another. Now, my code is
not executing. For example, I have some code that is supposed to run
when a field "gets focus (i.e. On Got Focus)". It is not working.

Since I am in Microsoft Access 2007, I went to the "Office Button" and
then clicked the "Access Button" then went to the "Trust Center"
Option and clicked on the "Trust Center Settings..." button. I then
went to the "Macro Settings" and changed the setting to "Enable all
macros...". However, this had no impact on running my code.

Any suggestions?
 
B

Billy

Further information: I went to the "Immediate Window" and typed
"msgbox hello" and then hit enter and the following error came up:

"The macros in this project are disabled. Please refer to the online
help or documentation of the host application to determine how to
enable macros." This was in an error message with a dialog box title
"Microsoft Visual Basic".

Still hoping someone can give me a tip. Anyone?
 
6

'69 Camaro

Hi, Billy.
Still hoping someone can give me a tip.

Is the database file in a trusted location? Please see Access MVP Tom
Wickerath's article, "Dealing With The Trust Center," on the following Web
page:

http://www.access.qbuilt.com/html/trust_center.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
B

Billy

I have now found that if I create a new blank database, the macros are
working, but if I open an existing database, none of the code is
working. Any suggestions?
 
A

Arvin Meyer [MVP]

If you converted this app from an earlier version of Access, you should
still have a copy of the earlier version. Make a few more copies of the
original files for testing. Try opening a copy without converting it. If
necessary, get one of the files from a machine that is still running the
code.

Now, in Access 2007, try enabling the macros again.
 
B

Billy

I now believe that the problem was the following message which
normally comes up:

"Security Warning: Certain Content in the database has been
disabled"

was somehow being suppressed. So, even though it was giving me these
errors, it was not prompting me with the "Security Warning..."
above.

If this is the case, can anyone give the steps for re-enabling this
warning message in case it gets turned off? I have looked a little
for a way to toggle this message off and on and haven't seen how to
get it back on after turning it off. Remember, I am using Microsoft
2007, so I need the instructions for toggling this message based on
Access 2007.
 

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