We help IT Professionals succeed at work.

Sum in Split Form

Kamlesh Jain
Kamlesh Jain asked
on
176 Views
Last Modified: 2017-03-09
I had this question after viewing Sum column, split form.

Dear Team,
I am facing similar problem. Split form is not showing the sum and some times, it shows incorrectly. The column values are arrived using a query, jsut to clarify.
Facing similar problem in other form as well, which is similar.
Screen Shot is attached.
Thanks
2017-02-28_LI.jpg
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Split form is not showing the sum and some times, it shows incorrectly.
you may check the data type of that field as well as the values within that field.
Kamlesh JainManager

Author

Commented:
data types is number and values are ok i mean numerals only.
CERTIFIED EXPERT

Commented:
based on your image file in your question, can you go to the column: Sold and see what dropdown options available there?
Kamlesh JainManager

Author

Commented:
Yes. Normal options like Count, Max, Minx, Std Deviation etc are available
2017-03-08--1-.png
CERTIFIED EXPERT

Commented:
try select "Sum" and see if the value looks abnormal
Kamlesh JainManager

Author

Commented:
tried Sum but not working... However, other functions like Count is working fine !!

Simlar to this form, i have another form but it shows vague results. Screen shot is attached, FYR.
2017-03-08--2-_LI.jpg
CERTIFIED EXPERT

Commented:
are both "Lifted Qty" and "Un Lifted Qty" derived/calculated fields? can we make sure these fields returning numeric values?

possible to upload a sample (without real data) here for troubleshooting?
Kamlesh JainManager

Author

Commented:
Sorry sir. I am not allowed to upload it on public platform. But i can send it through email, provided EE portal permissions this.
Kamlesh JainManager

Author

Commented:
These fields "Lifted qty" and Un lifted qty are derrived by query.

Two Tables are there : tblSale and tblLifting


SELECT Val((select NZ(sum(tbllifting.[Lift_qty]),0) from tbllifting where tbllifting.[Sale_BN] = tblsale.[Sale_BN])) AS Lifted, [Sale_Qty]-Val((select NZ(sum(tbllifting.[Lift_qty]),0) from tbllifting where tbllifting.[Sale_BN] = tblsale.[Sale_BN])) AS Unlifted, *
FROM tblsale
ORDER BY tblsale.Deal_Date DESC;

  Thanks for your efforts.
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Kamlesh JainManager

Author

Commented:
Thanks. Tried both querries but problem is not resolved. .. will compiling the database will make difference ?

I am ok with the outcome of the data components like lifted Qty and Un lifted qty. But problem is in the sum which is inbuilt feature of split database. Can we do it manually by adding three text boxes at the bottom or top of the data sheet part ?
CERTIFIED EXPERT

Commented:
will compiling the database will make difference ?
probably the answer is No.

I am ok with the outcome of the data components like lifted Qty and Un lifted qty. But problem is in the sum which is inbuilt feature of split database. Can we do it manually by adding three text boxes at the bottom or top of the data sheet part ?
I'm kinda don't get what you mean here. can you elaborate further?
Kamlesh JainManager

Author

Commented:
I mean formula part or data outcome of the quarries are ok. I am facing problem in Sum only. So can I add three text boxes at top or bottom, and put totals of the filtered record source there ?
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
I occasionally have a problem with the "totals" row.  It may have to do with how large the recordset is.  If you need to ensure that the row is always present and accurate, add controls to the footer of the datasheet form and copy them to unbound controls on the main form.

You can either do this with code in the AfterUpdate event of the subform or by using calculated columns.
Kamlesh JainManager

Author

Commented:
Thanks Mr Part for your kind advise. I would like to say :

1. Recordsets in my datasheet are barely 300 records.
2. i added footer to the control of form (Its split form and Footer component doesnt show at all in Form View. :(
3. I am not using Subform as its split form in which Form Part is in Form Header and Data sheet as Details, at Bottom,
4. FYI, screen shots of both forms are  attached.

Could you help please with Totals in Text Box controls ?
Thanks in advance.
2017-03-08--1-.png
2017-03-08--2-_LI.jpg
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Kamlesh JainManager

Author

Commented:
Thanks team. Now I will try to convert into subform or continuous form. Thanks for your efforts and time devoted.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions