Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Adjust the length of the Detail section if necessary so that there is approximately 0 . 5 inch below the frmBillingSubform control. The Detail section

Adjust the length of the Detail section if necessary so that there is approximately 0.5 inch below the frmBillingSubform control. The Detail section should be approximately 5.5 inches.
2.
On the Form Design Tools Design tab, in the Controls group, click the Text Box tool .
3.
Position the pointers plus symbol below the frmBillingSubform at the 5-inch mark on the vertical ruler and aligned with the 1-inch mark on the horizontal ruler, and then click to insert the text box control and label in the form. Dont be concerned about positioning the control precisely because youll resize and move the label and text box later.
4.
Open the Property Sheet, click the label control for the text box, set its Caption property to Number of Invoices, right-click the border of the label control, point to Size on the shortcut menu, and then click To Fit. Dont worry if the label control now overlaps the text box control.
Youll use Expression Builder to set a Control Source property for the text box control.
5.
Click the unbound text box control to select it, click the Control Source box in the Property Sheet, and then click the propertys Build button to open Expression Builder.
6.
In the Expression Elements box, click the expand indicator next to frmVisitsAndInvoices, and then click frmBillingSubform in the Expression Elements box.
7.
Scroll down the Expression Categories box, and then double-click txtInvoiceNumCount in the Expression Categories box. See Figure 6-41.
Figure 6-41
Text box controls expression in the Expression Builder dialog box
The Expression Builder dialog box is open. The Control Source property setting is in a text box at the top of the dialog box. In the Expression Elements list, f r m Billing Subform is selected. In the Expression Categories, the calculated control is selected from the list.Enlarge Image
Instead of adding txtInvoiceNumCount to the expression box at the top, the Expression Builder changed it to [frmBillingSubform]. Form![txtInvoiceNumCount]. This expression displays the value of the txtInvoiceNumCount control that is located in the frmBillingSubform form, which is a form object.
You need to add an equal sign to the beginning of the expression.
8.
Press HOME, type =(an equal sign), and then click the OK button. The Expression Builder dialog box closes, and the Control Source property is set.
Next, youll add a second text box control to the main form, set the Caption property for the label control, and use Expression Builder to set the text boxs Control Source property.
9.
Sidenote
Repeat Steps 2,3, and 4 to add a text box to the main form, positioning the text box at the 3.5-inch mark on the horizontal ruler and approximately the 5-inch mark on the vertical ruler, and setting the labels Caption property to Invoice Amount Total.
10.
Click the unbound text box control to select it, click the Control Source box in the Property Sheet, and then click the propertys Build button to open Expression Builder.
11.
In the Expression Builder dialog box, type =(an equal sign), in the Expression Elements box, click the expand indicator next to frmVisitsAndInvoices, click frmBillingSubform in the Expression Elements box, scroll down the Expression Categories box, and then double-click txtInvoiceAmtSum in the Expression Categories box.
12.
Click the OK button to accept the expression and close the Expression Builder dialog box, close the Property Sheet, and save the form.
13.
Click the Collapse the Ribbon button , switch to Form view, and then display the record for VisitID 1453. See Figure 6-42.
Figure 6-42
Form with calculated controls
The Access form f r m Visits And Invoices with a subform is open in Layout view. Directly below the subform, there are calculated controls labeled Number of Invoices, which shows the number of invoices in the subform, and Invoice Amount Total, which shows the total of the invoice amounts in the subform.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions