IT tutorials
 
Office
 

Microsoft Access 2010 : A Preview of the Database Components (part 2)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Product Key Free : Microsoft Office 2019 – Serial Number
10/1/2011 11:33:04 AM

Queries: Stored Questions or Actions You Apply to Data

Queries in Access are powerful and multifaceted. A query retrieves data from your database based on criteria you specify. An example is a query that retrieves all employees who live in Florida. Select queries allow you to view, summarize, and perform calculations on the data in tables. Action queries let you add to, update, and delete table data. To run a query, you select Queries from the Objects list and then double-click the query you want to run, or you can click in the list of queries to select the query you want to run and then right-click and select Open. When you run a Select query, a datasheet appears, containing all the fields specified in the query and all the records meeting the query’s criteria (see Figure 8). When you run an Action query, Access runs the specified action, such as making a new table or appending data to an existing table. In general, you can update the data in a query result because the result of a query is actually a dynamic set of records, called a dynaset, that is based on the tables’ data. A dynaset is a subset of data on which you can base a form or report.

Figure 8. The result of running the Product Orders query.

When you store a query, Access stores only the query’s definition, layout, or formatting properties in the database. Access offers an intuitive, user-friendly tool that helps you design queries: the Query Design window (see Figure 9). To open this window, select Queries from the Objects list in the Navigation Pane, choose the query you want to modify, right-click, and select Design View.

Figure 9. The design of a query that displays data from the Customer Extended query, Orders table, and Order Details table.

The query pictured in Figure 1.9 selects data from the CustomersExtended query and the Orders and Order Details tables. It displays several fields, including the ProductID, Quantity, Unit Price, and Discount fields from the Order Details table, and the OrderID, Order Date, Shipped Date, and CustomerID fields from the Orders table. The query’s output displays the data in order by order date. It displays only records with order dates within a specific date range. This special type of query is called a parameter query. It prompts for criteria at runtime, using the criteria entered by the user to determine which records it includes in the output.

Forms: A Means of Displaying, Modifying, and Adding Data

Although you can enter and modify data in a table’s Datasheet view, you can’t control the user’s actions very well, nor can you do much to facilitate the data-entry process. This is where forms come in. Access forms can have many traits, and they’re very flexible and powerful.

To view a form, you select Forms from the Objects list. Then you double-click the form you want to view or right-click in the list of forms to select the form you want to view and then click Open. Figure 10 illustrates a form in Form view. This Customer Details form is actually two forms in one: one main form and one subform. The main form displays information from the Customers table, and the subform displays information from the Orders table (a table that is related to the Customers table). As the user moves from customer to customer, the form displays the orders associated with that customer. When the user clicks to select an order, the form displays the entire order.

Figure 10. The Customer Details form, which includes customer, order, and order detail information.

Like tables and queries, you can also view forms in Design view. The Design view provides tools you may use to edit the layout of your form. To view the design of a form, you select Forms from the Objects list, choose the form whose design you want to modify, and then right-click and select Design View. Figure 11 shows the Customer Details form in Design view. 

Figure 11. The design of the Customer Details form, showing two subforms.

Reports: Turning Data into Information

Forms allow you to enter and edit information, but with reports, you can display information, usually to a printer. Figure 12 shows a report in Preview mode. To preview any report, you select Reports from the Objects list. You double-click the report you want to preview or right-click the report you want to preview from the list of reports in the Navigation Pane, and then you click Open. Notice the chart in the report in Figure 12. Like forms, reports can be elaborate and exciting, and they can contain valuable information.

Figure 12. A preview of the Product Sales Quantity by Employee report.

As you may have guessed, you can view reports in Design view, as shown in Figure 13. To view the design of a report, you select Reports from the Objects list, select the report you want to view, and then right-click and select Design View. Figure 1.13 illustrates a report with many sections; in the figure you can see the Page Header, Order ID Header, Detail section, Order ID Footer, and Page Footer (just a few of the many sections available on a report). Just as a form can contain subforms, a report can contain subreports. 

Figure 13. Design view of the Invoice report.

Macros: A Means of Automating a System

Macros in Access aren’t like the macros in other Office products. You can’t record them, as you can in Microsoft Word or Excel, and Access does not save them as Visual Basic for Applications (VBA) code. With Access macros, you can perform most of the tasks that you can manually perform from the keyboard, Ribbon, and QuickAccess toolbar. Macros allow you to build logic in to your application flow.

To run a macro, select Macros from the Objects list, and then double-click the macro you want to run (or you can right-click the macro and click Run). Access then executes the actions in the macro. To view a macro’s design, you select Macros from the Objects list, select the macro you want to modify, right-click and select Design View to open the Macro Design window (see Figure 14). The macro pictured in Figure 14 performs one action, the MessageBox action. The MessageBox action accepts four arguments: Message, Beep, Type, and Title.

Figure 14. The design of a macro containing the MessageBox action.

Modules: The Foundation of the Application Development Process

Modules, the foundation of any complex Access application, let you create libraries of functions that you can use throughout an application. You usually include subroutines and functions in the modules that you build. A function always returns a value; a subroutine does not. By using code modules, you can do just about anything with an Access application. Figure 15 shows an example of a module.

Figure 15. The global code module in Design view, showing the General Declarations section and the Generate and Create functions.
 
Others
 
- Microsoft Access 2010 : A Preview of the Database Components (part 1)
- Microsoft Visio 2010 : Removing Personal Information
- Microsoft Visio 2010 : Previewing and Printing Visio Diagrams
- Microsoft Office 2010 : Customizing Word - Setting Display Options
- Microsoft Office 2010 : Customizing Word - Setting General Options & Setting Page Display Options
- Microsoft Power Point 2010 : Presenting a Slide Show - Starting a Slide Show
- Microsoft Power Point 2010 : Working with Office Safe Modes
- Getting Started with Microsoft Excel 2010 : Choosing Dialog Box Options & Creating a Blank Workbook
- Getting Started with Microsoft Excel 2010 : Working with the Ribbon and Toolbars
- Getting Started with Microsoft Excel 2010 : Starting Excel & Choosing Commands
 
 
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