Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total Field in Form?

Status
Not open for further replies.

gscma1

Technical User
Jun 27, 2006
94
GB
This is probably a very easy to solve question but...

an i get a field on my form to toal up the values of some other fields?

for example, the user inputs the price for an electricity connection;gas connection;water connection;bt connection. I want the total of these connections to work out in another field.

Many Thanks
 
set control Source of the textbox

=[Field1]+[Field2]+[Field3]+[Field5]

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Thank you, that works.

However I just realised I need to be able to pick up only the total for a report. is this possible?
 
Does anybody know whether what i'm suggesting here is possible?

I would like to have the total field, as created above dropped into a report without having each individual field which makes up that total in the report as well.

Do I have to put the total field in to my table structure?

 
hi gscma1,
If you only want that field in report so you should make a new report in design mode.Make a textBox and set its datasource 'yours form field'. Is this the thing you want to.
 
thanks yummy7, that doesn't seem to work though, I have tried that.

Do you think it would be better to put the a total field within me table?

tblJob.....
gas connection
electricity connection
BT connection
water connection
total of services

would this enable me to use the field within a report?

 
yes why not, it will anable you.Try it.
You can also make your report through wizard by selecting only this field from your table.
 
Why put a total field in the table and involve yourself with the headache of keeping up the value? Just use a query as your source and include an extra field in the query that is the total of the values of all of those fields.

And you might consider a redesign to make a separate table for the jobservices, with one record containing the job# (duplicating the unique job identifier on the Job table), the ServiceType (could be an ID # that relates to a table listing a separate ID for each type of service), and the amount. This would enable you to handle whatever number of services were required for each job and, most important, handle additional services in the future, such as cable connections, network connections, etc., etc.

Bob
 
place a text box on the footer or header of the report then set it's controlsource
=[Field1]+[Field2]+[Field3]+[Field5]

or

=Sum([Field1])

etc..

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top