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

Hiding data on a report? 1

Status
Not open for further replies.

Remeartificer

Technical User
May 7, 2004
42
GB
Advice apreciated here please.

I have two tables:

1. tblCompany
2. tblTasks

I have included these two tables in a query that a report looks at before it lets me previews the data.

The four sets of data in this question are:

1. Form2Decision (Authorised or Cancelled)
2. Form2QuoteAmount
3. Form2QuoteDate
4. Form3TargetDate

My colleague will enter quote info from companies in the DB. Then, if accepted, he will print out a form to give a summary of the agreement with all four sets of data showing.

However, if the quote is too much it will be cancelled but he still needs to send back the same form to the company. When I print out the form, it says cancelled at the top but it still shows the quote info. He want me to hide this info if it has been cancelled.

ie: If Form2Decision = "cancelled" then hide Form2QuoteAmount, Form2QuoteDate, Form3TargetDate.

I am having a blank on this one and would appreciate any advice. How can I acheive this?

Or is my approach all wrong?

 
you would need to have some code for this...

in the onFormat event of your form, check the cancelled status, if so, blank out the quote text box, or delete the value inside it or whatever...

--------------------
Procrastinate Now!
 
I am not 100% sure of what you mean. Can you expand a little please?

Thanks :)
 
open the code editor, Alt + F11,

find the report...

get to the onFormat event of your report, or the onFormat event of the section of the report where your controls are in (if you are using groups)...
<hint there's 2 drop down boxes near the top of your editor window, see what options are displayed there, maybe even try a few which sound likely...>

then write a IF statement in that event...

If you need more help, I suggest you google for some vba tutorials...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top