2

I am new to MS Access. I am building a simple project and I already have created the tables, forms and queries. My question is, how would I compile and run my program ? Is there "F5-like" to run my project on MS Access ? Or how am I going to do this? Thank you.

2 Answers 2

5

In other Microsoft environments, F5 is the shortcut key for "Start Debugging", or "Run", or words to that effect. When the application starts it performs a default action:

  • Windows forms-based applications will display the startup form
  • Windows console applications will start running at static void Main()
  • ASP.NET applications will display the default page (Default.aspx).

Unfortunately, while the VBA development environment does have an F5 shortcut key to run code (and it can be very handy during development), it doesn't mean the same thing as it does in the other environments listed above.

To "run your project" in Access you need to manually perform whatever action you have specified as the default action when the database is opened. That is normally one of two things:

  • If you have created a Macro named AutoExec then Access will run that, or
  • If you have specified a startup form (see screenshot below) then Access will open it.

DisplayForm.png

So, to launch your Access project simply open the startup Form or run the AutoExec Macro. (Or, you could always just close the database and re-open it, and let Access perform the default action for you.)

1
  • Okay, I got it. I thought it's much like other windows app that runs by just pressing "F5" :). Anyway, thanks a lot.
    – Kentot
    Oct 25, 2013 at 2:07
1

make sure you have ODBC access support to run your program

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.