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

Cannot get conditional formatting working in report

Status
Not open for further replies.

rhyno2k

IS-IT--Management
Jun 9, 2001
222
US
Hi,

I've spent the better part of this afternoon trying to accomplish a simple task.

I have a form that we use to enter in RMA information. This form generates a report with the customer's information and where to send the equipment. I simply added a label with our address under our logo.

Recently, we just added a service center overseas, so I need to add an option on the report to display the address of our overseas service center, instead of the default main factory, based on a checkbox I'll add to the form called "SEND OVERSEAS".

However, I am producing nothing but sloooow generating reports (that don't accomplish the task) and errors.

Assuming I have a checkbox called "chkSendOverseas", a label called "lblUSAddress", and one called "lblOverseasAddress" -- how do I get the report to print the Overseas address under our logo if the "SEND OVERSEAS" checkbox is ticked?


Thanks,
--RHYNO
 
Hi.

You only have two addresses to worry about yes? Local and over seas?

If so, then one text box with each, same size, and same location.

First condition (Local box) if your box is checked, then font color is white (Same as the page) else black.

Second condition (Over seas label box) if box is checked, then font color is black, else white.

I would recomend that you put the address into your record source though, because if you ever grow to three addresses or something, you will have to re-write everything again.

ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Hi Chaz,

Thanks for the response.

OK, I added both addresses into each record of the dB (and made them default values for future entry).

I included the addresses on the form and put in the conditional formatting, but the layering / transparency screws everything up.

If I set the US Address on top and visible by default w/black text & white background, US records show OK, but Overseas do not show up at all because of the white background of the US field! If I make the US field background transparent, I still see the white letters over the black text.

And vice versa if the Overseas Address field is on top.

You can't make the text transparent by default... UGH.

I've seen other posts where it seems people have had success.

How do you do it?!

I've spent almost an entire day on something that should take an hour, maybe two!


Thanks,
--RHYNO
 
Well, I gave up on the crappy limited conditional formatting and just made some VBA code to make the Overseas address visible (and hide the US one) if the Overseas box was checked.
 
Glad you chose vba.

Again I would recomend having the address come from your data source though, so if it ever expands you are ready.

Glad you solved it.

ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Chaz, I did take your suggestion and added them to the data source for each record. I tried putting them in their own table, but I couldn't get them to appear on the report reliably, so they just became extra hidden fields with default data (the addresses).

Kinda kludgy, but it's only a 3MB database w/600 records -- don't think performance will degrade much ;)


Thanks again,
RHYNO
 
Cool.

Sometimes down and dirty works best. My warnings come only from my own goofs.

ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top