Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum Rss Feed

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Rss Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles

MS Access

Posted Oct 6, 2003

MS Access for the Business Environment: Reporting in MS Access: Grouped Transactional Report Part II - Page 10

By William Pearson

Working with Totals

Let's revisit the footers we have created long enough to add totals. We have aligned our various levels of grouping adequately to make this an efficient exercise. The totals that we insert will be group summaries, and, as such, are contextually sensitive to the section into which we insert them. The expression in a field that yields a summary at a given group level will also yield the correct summary when placed in another group level (respective of the level in which it is placed); it "knows" its location and, as we shall see, behaves accordingly.

We will start with the OrderDate footer section then work our way outward in summary creation, just as we did in the creation of the groups themselves.

1.  Click the ToolBox button to cause the ToolBox to appear.

The ToolBox button is depicted in Illustration 32.

Illustration 32: The ToolBox Button

The Controls ToolBox appears, as shown in Illustration 33.

Illustration 33: The Controls ToolBox

2.  Click the Text Box control (shown circled in red in Illustration 33 above).

3.  Place the mouse cursor within the OrderDate footer.

The cursor becomes a "+" ("crosshairs") sign, to assist us in placing the new control.

4.  Click at the point of insertion of the top left corner of the control.

5.  Try to place the control under the NetOrder field just above the OrderDate footer, by drawing a rectangular outline approximately its size under the NetOrder field.

6.  Click the Label control that has appeared to the left of the new text control.

7.  Press the Delete key.

The Label control disappears.

8.  Adjust the alignment of the new Text control as closely as possible with the NetOrder field by resizing and dragging as appropriate.

9.  Right-click the new Text control.

10.  Select Properties.

The Properties sheet appears, defaulted to the Format tab.

11.  Select Currency in the Format field.

The Properties sheet - Format tab for the new Text control appears as depicted in Illustration 34.

Illustration 34: Properties sheet - Format Tab for the New Text Control

NOTE: The new Text control, like all new controls, is assigned an identifying name by MS Access upon creation ("Text21" in Illustration 34). In general, we would assign logical names to the controls based upon corporate or project standards that made sense to us at the point of creation. We will leave these identifiers at default for purposes of this lesson, in the interest of brevity, but proper naming is, without doubt, an important attribute in organizing and maintaining the object set in any real world project.

12.  Click the Data tab.

13.  Type the following into the Control Source field:


The Properties sheet - Data tab appears as shown in Illustration 35.

Illustration 35: Properties sheet - Data Tab for the New Text Control

MS Access Archives

Latest Forum Threads
MS Access Forum
Topic By Replies Updated
Help With Microsoft Access kasy 0 September 4th, 07:35 PM
Linked table not sorting or filtering - ODBC error Java 1 August 28th, 10:37 AM
Use Parameter in select statement (Sql in Microsoft Access) katty.jonh 1 July 25th, 06:45 AM
Query Issue algebroni 7 July 23rd, 04:22 PM