Microsoft Access
  Home arrow Microsoft Access arrow Page 3 - Creating and Using Action Queries
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MICROSOFT ACCESS

Creating and Using Action Queries
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2007-01-16

    Table of Contents:
  • Creating and Using Action Queries
  • Creating an Employee Addresses Table Using a Select Query
  • Create an Address Table from the Select Query
  • Create an Append Query
  • Appending the Records

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Creating and Using Action Queries - Create an Address Table from the Select Query


    (Page 3 of 5 )

    Open the EmployeeAddress query in design view as shown. Right click on an empty area by the side of the Employees table and click on the Make-Table Query... submenu item as shown.

     

    This brings up the Make Table window as shown. You have the option of creating a new table in the current database, or in another database with a name you provide. Here a table called Address will be created in the current database. Type in the name Address and click on the OK button.

    This brings up the Save As dialog. Save the query under a suitable name. Here it is called the AddressQuery.

    Click on the OK button to the Save query. This adds the AddressQuery to the database.

    The SQLView of the MakeTable query is as shown here. This is called the Select Into statement. This will dump the selected columns into a table called Address.

     

    SELECT Employees!FirstName & " " & Employees!LastName AS Emp_Name, 
    Employees.Address, Employees.City, Employees.PostalCode, 
    Employees.Country INTO Address
    FROM   Employees;
    

    When you click this query in the main window you will get a message from MS Access as shown.

    When you click on the Yes button you get another message warning you about what is going to happen, and how the action is not reversible (cannot be undone).

    Go ahead and click on the Yes button one more time. This will create the 'Address' table as shown in the main window of the database.

    More Microsoft Access Articles
    More By Jayaram Krishnaswamy


       · This is really written for those beginners learning to use MS Access as a first step...
     

    MICROSOFT ACCESS ARTICLES

    - Linking SQL Express 2005 Tables to MS Access...
    - Working with Access Projects in Access 2007
    - Exploring Access 2007
    - Working with Stored Procedures in an MS Acce...
    - Creating and Using Action Queries
    - Creating Data Access Pages with Charts using...
    - Advanced Ideas using VBA
    - VBA Details
    - Updating Records in MS Access
    - Using ADO`s Record Object with URLs
    - Exporting XML from MS Access 2003
    - Importing XML into MS Access 2003
    - On Using Pass-through Queries in MS Access
    - Distributed Queries in MS Access
    - Configuring a Linked Microsoft Access Server...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway