Logical summation in unbond text box

meenctg

Learn24bd
Local time
Tomorrow, 03:41
Joined
May 8, 2012
Messages
133
In my page i create Unbond text box it's name ttl.
Here a columnar field pointTaday .


My plane

I want to get Summation of pointToday's field with a condition.
The condition is ,

If pointToday contain one or more 0.00 value then unbond text box will show "Sorry" Else Sum([pointToday])

Please suggest me or give solution of this problem............
For better understanding my problem please see problem image
attachment.php
 

Attachments

  • problem_image.png
    problem_image.png
    33.4 KB · Views: 281
Look at "DemoSumA20022003.mdb (attachment, zip).
Look at TAble1, Form1 (VBA). Open form and try.
 

Attachments

Ok Uncle Gizmo. He can adapt it as he want.
 
Look at "DemoSumA20022003.mdb (attachment, zip).
Look at TAble1, Form1 (VBA). Open form and try.

I am trying. But if i apply this code at report what i have to do
Here apply you at Form_Current()
 
I am lost! is this question being answered in two separate threads?



I have done my work.
I have been try for this problem 3 hr. At last i have completed my task without any VB.

at first i created a field in my query abc with the condition
abc: IIf([GradePoint]="0.00",1,0)

Then i have got for 1 every 0.00

Then i create a unbond text box (name: Text12) in my report for summation of Unbond text box (text 12)
=Sum([abc])

At last the final output i have got easily with this
=IIf([Text12]>=1,"Sorry",sum([Gradepoint]))

Thanks for try to help........
 
If you want a "REPORT", send some records (your table), and tell us
what is a look of "Report", (draw the report).
 
I am lost! is this question being answered in two separate threads?
MStef who posted in #3 is helping. The original poster is meenctg.

@meenctg: You've asked this question before in a separate thread and I asked for clarity but you didn't reply back. You will need to count how many zeros occur in the current recordset and if it's greater than 0, "Sorry", otherwise return the Sum()

To get you started:
Code:
=IIF(Nz(DCount(), 0) > 0, Sum([YourField]), "Sorry")
 

Users who are viewing this thread

Back
Top Bottom