Run a Query in MS Access 2007

We can create databases, tables, forms and other reports in MS Access. This article will help user to run SQL Query in MS Access. We can run the same queries as we use in SQL to fetch data from the database. This article is intended for users who've just started to learn MS Access and wants to run SQL queries in MS Access. The only prerequisite which is needed before a user proceed with writing and running queries in MS access is that the user needs to have access to the database in use in the organisation.

Steps

  1. Click on Start-->Programs-->Microsoft Office-->Microsoft Office Access 2007. Application will be started with following start up page.
  2. Click on Create. The following page will appear. Click on “Create” highlighted in green.
  3. User is presented with the following options, when we click on “Create” in the above page. Now click on the highlighted option “Query Design”.
  4. Click “Close” in the Show Table pop-window that appears.
  5. Go to Query Tools -> Design tab and Click “Pass-Through” as shown in the figure below.
  6. Click on “Property Sheet”, it is one of the option available in “Query Tools”.
  7. Property Sheet window will appear on the right side of the screen. Click on the “ODBC Connect Str" text box and then press the button next to ODBC.
  8. Select “Machine Data Source” tab in the window that appears.
    • The following page should display the database available to users in your organisation. Now, users can select the database and start writing the SQL queries.
  9. Write your SQL query in the highlighted area and click on Run.
    • The results should appear like this.



Things You'll Need

  • User need to have access to the Database used in the organisation.
  • User can contact the Technology help-desk prior to start executing queries through MS Access.