Go Back   Access World Forums > Apps and Windows > Visual Basic

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-17-2019, 01:01 PM   #1
mracz001
Newly Registered User
 
Join Date: Apr 2019
Posts: 3
Thanks: 3
Thanked 0 Times in 0 Posts
mracz001 is on a distinguished road
Summarizing calculated field in a form

Dear Members.

Why not possible to Sum calculated field in the footer of a subform?
Example:
There is a product order 10000 pcs, which is delivered couple times.
One pallet contains 100 produts.
One occasion the lorry takes for example 12 pallets.
Form ORDER contains subform DELIVERY.
PALLETPCS is a field in DELIVERY table.
In the footer of subform Sum([PALLETPCS]) will work.

If I have a calculated field like PRODUCTPCS = PALLETPCS * 100
then Sum([PRODUCTPCS]) will show #Error

In fact Sum([PALLETPCS]) will also show #Error

I do not understand this. Why??

Question:
How can I summarize a calculated data in the footer of a subform??
Please help. Thank you

mracz001 is offline   Reply With Quote
Old 11-17-2019, 01:04 PM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,505
Thanks: 58
Thanked 1,422 Times in 1,403 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Summarizing calculated field in a form

Hi. Actually, it's possible to sum a calculated value, you just have to calculate it again. For example, if you had something like:
Code:
PALLETPCS: [PRODUCTPCS] * 100
And doing something like this doesn't work:
Code:
Sum([PALLETPCS])
Then, try doing it this way instead:
Code:
Sum([PRODUCTPCS]*100)
Hope that helps...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
mracz001 (11-17-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make field in a form active or inactive based on the value of a calculated field cmray58 Forms 4 02-09-2019 03:37 PM
Calculated field in a query/table based on a calculated field joannkt General 5 11-07-2013 11:06 AM
calculated field within a form alscompany Forms 1 02-28-2012 10:50 AM
Whish is faster? - Calculated field in QUERY or Calculated field in REPORT? Cosmos75 Reports 3 03-18-2003 09:26 AM
PLEASE Help ME,Get a calculated field on a form to write to the same field on a table lcalcagni Forms 3 03-15-2001 06:32 AM




All times are GMT -8. The time now is 01:58 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World