Calculation result in text box

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
First, change the format of your subform to continuos forms, then in the form footer, create a textbox called "Total", set its properties to =Sum([Amount]), set properties visible to no, save subform.You will also need to get all controls on one line for your subform, as in the file I have returned to you Charlie.
on your main form, set the properties of your textbox to =[tblinvoice Subform]!Total

This will work.

Dave
Note:
all the names above are as supplied in the original file
This message was edited by Davepacey on 2003-02-17 17:00
 
Upvote 0
This is how:
I opened the form SupplierInvoicesSubform in design view.
Then I added a text box to the footer section and named it txtInvoiceTotal.
I changed the label test to Invoice Total.
In the textbox contro; property I entered =sum([Amount]).
I then tested it by going to formview on the view menu.
I then saved and closed the form.

I then opened the main form frmSupplierInvoices in design view.
then added a textbox under the subform.
I changed the label to Invoice total.
Then I selected the control source property and hit the expression builder.
In the exp builder I selected forms,loaded forms,frmSupplierInvoices,frmSupplierInvoicesSubform in the first column and txtInvoiceTotal in the second column and hit paste. i then finished the formatting etc.
Phew...It only took me ALL day though!

Charlie
 
Upvote 0
Formatting values in an expression

I have created a query to extract certain data for download to excel. As I don't want null or zero values to be converted I have built an IIF expression selecting only values greater than zero. IIf(([Wage]![entry]>0),([Wage]![entry]),"").
While the table values are formatted as currency the query yields values that have infinite decimals and that are not read by excel as a number even tho I have set the property in the query expression to currency. Any suggestions as to what I may have done wrong.
Thanks
Peter
 
Upvote 0
I suspect that by forcing Access to use an empty string rather than a Null value you are turning it into a text field.

Peter
 
Upvote 0
Thanks is there any way I can have zeros and null fields import to excel as a blank field?
 
Upvote 0

Forum statistics

Threads
1,221,805
Messages
6,162,074
Members
451,738
Latest member
gaseremad

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top