IT tutorials
 
Office
 

Microsoft Access 2010 : Modifying the Datasheet View of a Query, Printing Query Results, Designing a Query Based on Multiple Tables

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Product Key Free : Microsoft Office 2019 – Serial Number
12/8/2012 6:08:55 PM

Modifying the Datasheet View of a Query

Just as you can modify the Datasheet view of a table, you can modify the Datasheet view of a query. You can change things such as the font, the column order, the column widths, and the attributes of the datasheet itself (such as background color). When you close the query, if you have made no changes to the design of the query but you have made changes to the layout of the datasheet, Access prompts you with the dialog box displayed in Figure 1. In this dialog box, Access asks whether you want to change the layout changes that you made. If you click Yes, Access remembers the layout changes. If you click No, Access will use the old layout the next time that you view the query.

Figure 11. Saving the layout of a query.


Saving a Query

To save a query, you click the Save button on the toolbar. The Save As dialog box appears (see Figure 2). After you provide a name and click OK, Access saves the SQL (Structured Query Language) statement underlying the query. It does not save the result of the query.

Figure 2. The Save As dialog box.


The industry standard for naming queries is to prefix the name with qry.

Printing Query Results

It is easy to print query results. Although not as elegant as a printed report, printed query results are often sufficient to meet people’s needs. Here’s how you print query results:

1.
Run the query whose results you want to print.

2.
Click the File tab.

3.
Select Print. Your screen should appear as in Figure 3.

Figure 3. After selecting Print, three print options are available.

4.
Click Print Preview. The results will appear as in Figure 4.

Figure 4. The Print Preview option enables you to preview query results.
4

Closing a Query

You close a query using the close button (the X) in the upper-right corner of the Query Design tab. How Access responds depends on the following three conditions:

  • Whether you previously named and saved the query

  • Whether you made design changes to the query

  • Whether you made changes to the layout of the query while you were in Datasheet view

If you did not previously name and save the query, Access prompts you with the Save As dialog box when you attempt to close the query. If you previously named and saved the query but did not make any design or layout changes to the query, Access provides no prompts. If you made design changes or design and layout changes, Access asks whether you want to save those design changes. If you made only layout changes, Access asks if you want to save the layout changes.


Designing a Query Based on Multiple Tables

If you have properly normalized your table data, you probably want to bring the data from your tables back together by using queries. Fortunately, you can do this quite easily by using Access queries.

The query in Figure 5 joins the Customers, Orders, and Order Details tables, pulling fields from each. Notice in the figure that I have selected the ID and Company fields from the Customers table, the Order ID and Order Date fields from the Orders table, and the Unit Price and Quantity fields from the Order Details table. After you run this query, you should see the results shown in Figure 6. Notice that you get a record in the query’s result for every record in the Order Details table. In other words, there are 2,155 records in the Order Details table, and that’s how many records appear in the query output. By creating a multitable query, you can look at data from related tables, along with the data from the Order Details table.

Figure 5. A query joining the Customers, Orders, and Order Details tables.

Figure 6. The results of querying multiple tables.

To remove a table from a query, you click anywhere on the table in the top half of the query design grid and then press the Delete key. You can add tables to the query at any time by clicking the Show Table button in the Query Setup group on the Design tab of the Ribbon. If you prefer, you can show the Navigation Pane and then click and drag tables directly from the Navigation Pane to the top half of the query design grid.

 
Others
 
- Microsoft Access 2010 : Working with Simple Criteria (part 2) - Creating Criteria Based on Multiple Conditions
- Microsoft Access 2010 : Working with Simple Criteria (part 1) - Using an Exact Match Query
- Microsoft Excel 2010 : Grouping Multiple Sets of Data
- Microsoft Excel 2010 : Consolidating Multiple Sets of Data into a Single Workbook
- Microsoft Word 2010 : Selecting Text Attributes (part 2)
- Microsoft Word 2010 : Selecting Text Attributes (part 1) - Choosing a Font, Selecting a Font Size, Applying Formatting Attributes
- Microsoft Project 2010 : Using Sorts and Auto-filters
- Microsoft Visio 2010 : Creating Rack Diagrams
- Microsoft Visio 2010 : Organizing Network Shapes in a Diagram
- Microsoft Outlook 2010 : How Outlook Stores Data
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us