0

Suppose you want to examine the contents of an untrusted Access database.

It seems there should be a way to open it in Access with macros and VBA disabled.

Searching around the web, I've found several options which aren't quite right:

  • Hold down Shift to suppress any Autoexec macro or Startup form. No good because (unbelievably) it can be bypassed.
  • Set macro security level to Medium. The only options it gives you are Cancel and Open. There's no "open with scripting disabled".
  • "Sandbox mode" ie "block unsafe expressions". No good, most scripts still run.
  • KB article How to turn off Visual Basic for Applications when deploying Office 2003 or Office XP gives 5 options which are just variations on two methods:
    • uninstall (or don't install) VBA. Too drastic. I still want to examine the code I might or might not want to run.
    • Set a "VBAOff" registry value, equivalently through either Policy or regedit. This works for all Office applications except Access!

Does anyone have any other ideas? I'm using Access 2003.

6
  • If you really don't trust it, how about opening it in a virtual machine and just rollback a snapshot if it breaks something?
    – cularis
    Commented Jul 4, 2011 at 8:14
  • @cularis: a VM works, but it's a bit cumbersome. It seems like there should be a way to do what I am asking.
    – Hugh Allen
    Commented Jul 4, 2011 at 9:29
  • What's in it that you want to examine? If it's only data tables, create a new blank database and then link to the tables in the other database. This will be completely safe. If you need to look at the code, that's a different issue. What exactly are you afraid of? Commented Jul 6, 2011 at 1:39
  • 1
    Are you aware of the fact that you can turn back on the DisableBypassKey without opening the database in the Access UI? Commented Jul 6, 2011 at 1:40
  • @David W. Fenton: (you mean AllowBypassKey) that's a good idea which I hadn't thought of. It still takes effort though :(
    – Hugh Allen
    Commented Jul 6, 2011 at 13:41

1 Answer 1

0

You can link to the tables from one instance of Access to another. By doing this you can control your viewing environment and thus be sure that only the forms and macros that you want to run will run.

For example, create a new empty data base. Call it something like DB1.mdb. Then Select Tables | New | Link .. and then point to the data base and table you want to safely view. Repeat this for each table you want to access. Once you have the table link(s) created, you can create queries, forms and reports on these tables without any risk of any unwanted macros running.

More powerfully, but also with more technical ability on your part, you can also drag and drop queries, forms, reports and visual basic and macros from DB1.mdb into DB2.mdb. Before you run them, you can inspect them to make sure of what they will or will not do. For example, you could open them and delete any macros, like if you were really skiddish about what was there for some reason. -- Cheers

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .