he date/time values, and then click Next.
Note: In Design view, you can use an expression to group by any time period you want, but the wizard only offers these choices.
On the last page of the wizard, give the query a title, specify whether you want to open or modify the query, and then click Finish.
If you choose to open the query, the query displays the selected data in Datasheet view. If you choose to modify the query, the query opens in Design view.
Create a query by working in Design view
You can use Design view to manually create a select query. When you use Design view, you have more control over the details of the query design, but it is easier to make design mistakes, and it can take longer than using the wizard.
Create a query
Step 1: Add data sources
When you use Design view, to add data sources, you add the data sources and fields in separate steps. However, you can always add more data sources later if you want.
On the Create tab, in the Other group, click Query Design.
Double-click each data source that you want to use or select each data source and then click Add.
When you add the data sources, if the sources already have relationships defined between them, those relationships are automatically added to the query as joins. Joins specify how data from related sources should be combined. Access also automatically creates a join between two tables if they have fields have compatible data types and one field is a primary key.
You might want to adjust the joins that Access creates. Access determines what type of join to create based on the relationship the join represents. If Access creates a join but there is no defined relationship, Access creates an inner join.
If Access automatically creates the correct joins when you add the data sources, you can skip ahead to Step 3: Add output fields.
Use the same data source several times
In some cases, you want to join two copies of the same table or query, called a self-join, that combines records from the same table when there are matching values in the joined fields. For example, say you have an Employees table in which the ReportsTo field for each employee's record displays his or her manager's ID instead of name. You could use a self-join to display the manager's name in each employee's record instead.
When you add a data source a second time, Access appends _1 to the name of the second instance. For example, if you added the Employees table twice, the second instance would be named Employees_1.
Step 2: Join related data sources
If the data sources that you add to a query already have relationships, Access automatically creates an inner join for each relationship. If referential integrity is enforced, Access also displays a "1" above the join line to show which table is on the "one" side of a one-to-many relationship and an infinity symbol (∞) to show which table is on the "many" side.
If you add queries to your query, and have not created relationships between those queries, Access does not automatically create joins between those queries, or between queries and tables that are not related. If Access does not create joins when you add data sources, you should usually add them yourself. Data sources that are not joined to any other data source can cause problems with the query results.
You might also want to change the type of a join from an inner join to an outer join, so that your query includes more records.
Add a join
To add a join, drag a field from one data source to a corresponding field on another data source.
Access displays a line between the two fields to show that a join has been created.
Change a join
Double-click the join you want to change.
The Join Properties dialog box appears.
In the Join Properties dialog box, review the three options.
Click the option that you want to use, and then click OK.
After the joins are ready, you add output fields — fields that have data that you want in the query results.
Step 3: Add output fields
You can easily add a field from any of the data sources that you added in step 1.
To add a field, drag the field from a d