Creating a New Table with Query Results


graphics/06inf25.jpg

graphics/one_icon.jpg

Create a query that includes the fields you want to use in the new table, and set up the query's criteria to select the records you want placed in the new table.

graphics/two_icon.jpg

Open the Query menu and choose Make-Table Query .

graphics/three_icon.jpg

The Make Table dialog box appears. Type a name for the new table in the Table Name field.

graphics/four_icon.jpg

Click OK .

INTRODUCTION

One way to use queries is to pull certain records from a database table and use those records to create a new table. For example, suppose that you want to create a new database table of clients from a certain state. You can do so by creating a make-table query.

graphics/06inf26.jpg

graphics/five_icon.jpg

Click the Run button on the Standard toolbar in the main Access window.

graphics/six_icon.jpg

Access displays a message explaining that a new table will be created with the records contained in the query results. Click Yes to create the table.

graphics/seven_icon.jpg

The new table is listed in the database window with the name you specified. (To view the table, close the query, click Tables in the database window's Objects bar, and double-click the table name.)

TIP

New Table

Because the make-table query replaces the original query on which it is based, it's a good idea to create a new query for this action. Alternatively, save the make-table query with a different name (see the next tip).

TIP

Using the Save As Command

When you modify a query's design, the new query (in this case, the make-table query) replaces the query you started with. If you want to keep the original query, save the new query under a new name by opening the File menu, choosing Save As , and typing a new query name in the dialog box that appears.



Easy Microsoft Office Access 2003
Easy Microsoft Office Access 2003
ISBN: 789729598
EAN: N/A
Year: 2003
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net