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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

suppress detail

Status
Not open for further replies.

crystalfun

Programmer
Feb 8, 2001
39
0
0
US
I'm used to writing crystal reports where I can suppress data if certain criteria are met. This is easy in Crystal. Is there a way to do this in Access?

I have a report where the group header has a project #, the detail has company, dept, account, and balance of account. The group footer has the subtotal of all of the account balances - subtotaled by project number =Sum([Balance]). I want to suppress all detail related to the project number in the group header if the =Sum([Balance]) in the group footer is < 100,000. How can this be done in Access? Thanks.
 
In the OnFormat of the Detail Section set the Sections visible property to False.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Do you mean the Event Section for OnFormat? This requests an even procedure.

Where would I place the condition of suppress (or sections visible False) if sum < 100,000?
 
Select Event Procedure in the OnFormat and click the button to the right of the dropdown. Now you are in the subroutine for this Event.

If me.ControlName < 100000 then
Forms!Customers.Section(acDetail).Visible = false
else
Forms!Customers.Section(acDetail).Visible = true
end if

Just update the red ControlName with the name of the control where you are Summing the Balance for the Project Number in the footer.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Excuse me, but you have to change the name of the form from Customers in the example to the name of your form.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top