Print Report only if balance is NOT Zero (1 Viewer)

access2010

Registered User.
Local time
Today, 07:57
Joined
Dec 26, 2009
Messages
1,022
A = Could we please receive a suggestion on how to print the attached Access 2003 report if;
= Total All Brokers is a plus or negative number =
We do not want any records printed if the value is = 0 =

B = Could we also receive a suggestion on how to print a new report that only shows a ONE LINE summary with the Stock Symbol / Stock Name / We do not want any records printed if the value is = 0 =

We would like to view only the records when = Total All Brokers is a plus or negative number =

Your suggestions will be appreciated.

Thank you.
Crystal
 

Attachments

  • Positive_or_Negative=260.mdb
    420 KB · Views: 84

June7

AWF VIP
Local time
Today, 06:57
Joined
Mar 9, 2014
Messages
5,488
A) code behind a form does a DLookup() or DSum() to pull info from table or query and check value against condition

B) code in Detail Format event can hide controls

Unfortunately, I get error when trying to open report.
 
Last edited:

access2010

Registered User.
Local time
Today, 07:57
Joined
Dec 26, 2009
Messages
1,022
June7, thank you for your note.
We have tried many combinations of the Sorting and Grouping choices in this Access 2003 database, but we seem to be missing something.
Nicole
 

June7

AWF VIP
Local time
Today, 06:57
Joined
Mar 9, 2014
Messages
5,488
And now the report is opening for me. Weird.

I don't know what Sorting & Grouping has to do with my suggestion.

Where would I find Total All Brokers? Would that be textbox named EquityQuantity with expression =Sum([Quantity])?

Do you want to dynamically display records depending on value in EquityQuantity?

Why repeat the same calculation in Symbol_Stock Header and Footer sections?

Whenever I try putting code behind report, it just errors when I try to open. Very Weird.

Consider:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctrl As Control
For Each ctrl In Me.Section(acDetail).Controls
   ctrl.Visible = Me.EquityQuantity <> 0
Next ctrl
End Sub
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:57
Joined
May 7, 2009
Messages
19,247
i created new Query, qrySymbolTotalQty.
then i Joined this query to your existing query, Investments_Purchases_Sales_RQ_RBC.
see the report now.
 

Attachments

  • Positive_or_Negative=260.mdb
    444 KB · Views: 95

access2010

Registered User.
Local time
Today, 07:57
Joined
Dec 26, 2009
Messages
1,022
i created new Query, qrySymbolTotalQty.
then i Joined this query to your existing query, Investments_Purchases_Sales_RQ_RBC.
see the report now.
Thank you, Arnelgp for your corrected database.

We have imported both of your Queries and Report into our live database, but Values of 000 are still being printed.
Could you please advise me as to what I have done wrong.?

Nicole
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:57
Joined
May 7, 2009
Messages
19,247
you will also need to overwrite your old Investments_Purchases_Sales_RQ_RBC with
the one from the db i posted.
 

access2010

Registered User.
Local time
Today, 07:57
Joined
Dec 26, 2009
Messages
1,022
Thank you, Arrnelgp for your reply.

Your help in editing our records for Zero values has TREMEDOUSLY decreased our report pages.
===

Starting again, I have deleted the two Queries and one Report from our live Database.

Then imported your Report and your two Queries from your database.

The report shows = TWO = records with a = 0 = balance

Could you please suggest what I should do to correct this problem?


Thank you.
Crystal
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:57
Joined
May 7, 2009
Messages
19,247
see the Recordsource of the report from my uploaded db against your's.
are they the same?
otherwise you may need to upload your db (or email me?)
 

access2010

Registered User.
Local time
Today, 07:57
Joined
Dec 26, 2009
Messages
1,022

arnelgp;
Thank you for helping us obtain the report that we required.
I just found out the reason your report was not working was due to the fact that we had been opening your report from an old form and this form was corrupting your report.

T.H.A.N.K. YOU
Crystal​

 

Users who are viewing this thread

Top Bottom