To add tables to your query

 

1.Click the Show Tables toolbar_icon_add_table button on the toolbar.

2.On the Tables tab, hold down the CTRL key and select the tables to add to your query.

3.Click Add.

4.Click Close.

 

The tables you add will appear in the upper half of the Design View. Any related fields in the tables will be automatically joined (indicated by a line attaching the fields).

 

For example, in the graphic below the OrderNumber field in the two tables relate to each other, so they are joined.

 

query_relationship  

 

You can set your own relationships by selecting a field in one table, then dragging the line that appears to a field in the other table.

 

You can edit a relationship by right-clicking the connecting line, and selecting any of the All from left and only matching from right, All from right and only matching from left, or Only matching from both options. A small + sign will appear beside the relevant field if you select one of the first two options.

 

query_relationship_2

 

You can delete a relationship by right-clicking the line, and clicking Remove relation from view.

 

To add a table field to your query

 

1.In a table, double-click the field you want to add to your query.

 

To add all table fields to your query

 

1.In a table, double-click the asterisk at the top of the table.

To remove a table field from your query

 

1.Right-click the field’s column in the bottom part of the view, and click Delete Column.

 

To remove all table fields from your query

 

1.Right-click any field’s column in the bottom part of the view, and click Delete All.

 

To remove a table from your query

 

1.Click the icon_close button in the top-right corner of the table you want to remove.

 

To create a column in your query

 

1.Double-click the Field cell of an empty column.

2.Type the name you want to use for the new column, followed by a colon.

3.Type the expression you want to use to calculate the new column’s data.

 

To move a column in your query

 

1.Position the pointer over the grey border at the top of the column you want to move.

2.Drag the column to its new position.

 

query_reorder_columns_1   query_reorder_columns_2