Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / productivity / Office

Quick-and-Dirty Testing of Microsoft Access Queries

3.67/5 (3 votes)
28 Jan 2014CPOL 23.6K  
How to query Microsoft Access tables

Access Data in a Microsoft Access Database

Say what you will about it, Microsoft Access is still widely used (and abused?)

At any rate, if you work with Microsoft Access, you may want to run a query against it to see what data you will get or to perform a sanity check on your SQL statement. To do so is easy, but not necessarily intuitive.

Just follow these steps:

  1. Open MSAccess by 2-clicking the appropriate .MDB file (the database you want to query)
  2. Select the "Create" tab
  3. Select the "Query Design" icon
  4. Mash the "Close" button on the "Show Table" dialog
  5. Right-click in the query window and select SQL View
  6. Enter your query in the window (overwriting the default "SELECT;")
  7. Mash the Run button (red exclamation mark) on the Design tab
  8. Gaze in wonder at the data returned, batting your eyelashes coquettishly if you're a chick or pounding your chest thunderingly if you're a cat.

Note: This works for Access 2007; other versions of Access should work similarly.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)