|Figure 1: The Make Table Query for an Order Management System.|
- Open the database which we are going to query (In my case this is the Order Management System).
- Click the QUERY DESIGN icon (located in the OTHER group of the CREATE ribbon).
- Select the tables to be used from the SHOW TABLE dialog form. I have selected tblCustomer, tblOrganisation, tblPerson and tblAddress.
- Next select all the fields from the existing tables to be used in the query. These not only form the query results, but also the structure for the new table. I have chosen fields from all four tables so that the new table will be self sufficient.
- Amend the table relationships (or Joins) as required.
- Click the MAKE TABLE icon (located in the QUERY TYPE group of the DESIGN ribbon). This opens the MAKE TABLE dialog form (see Figure 2 below).
Figure 2: The Make Table Dialog Form.
- Enter the name of the new table that we are going to create. I have called mine tblCustomerTeamsMay2012.
- Click the option button for ANOTHER DATABASE. This ensures the new table will be created in a different database.
- Browse to the location of the external database. I have called mine HistoricData.accdb. Double click the file to select and then click OK to close the dialog form.
- Test the Query by clicking the DATASHEET VIEW icon (located in the RESULTS GROUP of the DESIGN ribbon).
- If you are happy with the data displayed, you can run the Make Table Query by clicking the RUN icon (located in the RESULTS group of the DESIGN ribbon). This will now create the new table in the external database.
|Figure 4: The newly created tblCustomerTeamsMay2012 table (Design View).|