Disable autoexec macro access 2003 with VBScript
I try this code, I don't have error but the autoexec macro run with open db access and not run the OutputTo excel file:
Set accDB = CreateObject("Access.Application")
.visible = true
.automationsecurity = 1
.DoCmd.SelectObject acMacro, "autoexec"
.DoCmd.OutputTo acOutputTable, "db", "xls", "C:\Inetpub\wwwroot\db\db.xls"
End With Set accDB = Nothing
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Note: the database is already split into FE and BE and both are password protected. The code is already password protected. I thought my system was secure but a friend whom I challenged to break into it was able to get to my code.
He confessed to manipulating the autoexec file so how is a guy supposed to secure his access system now
I have a somewhat intresting issue. My organization is still mostly using Office 2003. Recently, I have been upgraded to 2007. I have been coding and designing an access database application. In access 2007, I have saved the format in 2003 mdb, however, when I open the database in 2003 my autoexec macro will not run. I recieve the "halt" error. Can anyone help me understand what access 2007 changed in my database that would cause my autoexec macro not to run in 2003? I have been searching the internet all morning and yesterday for a solution
An AutoExec macro is just a macro that is named AutoExec. When a database starts, Access runs the AutoExec macro before it runs any other macros or VBA code. (Applies to: Microsoft Office Access 2007)
I've create the macro, named it Autoexec, chose the SetWarnings action, set it to False. When I run queries I still get the pop up asking if I'm sure I wanna.blah blah I've also set the macro security setting to low.
DoCmd.ShowToolbar "Ribbon", acToolbarNo
However, using the macro builder I use the "ShowToolbar" action but it doesn't recognise the "Ribbon" toolbar name. Is there a different name I should be using here or can I create an AutoExec VBA module?
Edit: Think I might have sorted this actually - I created a function with the above code in a VBA module and just created an AutoExec Macro which calls the function. Is that the best way to do what I'm trying to do?
You can also use a special macro named AutoExec to carry out an action or series of actions when your database first opens. When you open a database, Microsoft Access looks for a macro with this name and, if it finds one, runs it automatically.