Formatting reports

A

AB

I have a report that gives me details about item records. We have several
hundred customers who have orders in process at any given time that show up
on these reports. There are a few dozen customers who's orders we pay
particular attention to. Is there any the report can highlight records that
belong to one of these particular customers?

My first idea was conditional formating, but we would have too many
conditions. I also considered having the detail fields on top of a
transparent box that would have it's properties changed to solid and it's
background color changed to a light gray when shipper = "special customer",
but I can't figure out the VBA part of that?

I also have considered creating a control panel where the user could select
any important accounts from multi-select listbox which would provide
parameters for the query, limiting to only those customers selected, but I
can't get that to work either.

Any help would be greatly appreciated.
 
S

Steve Schapel

AB,

As regards Conditional Formatting, what do you mean by "we would have
too many conditions"? Isn't there only one condition - the customer is
"one of these particular customers"? Could you add a Yes/No data type
field to your Customers table, to indicate which of your customers fall
into the "particular customers" category? If so, you could add this
field to the query that the report is based on, and then use this as the
basis of your Conditional Formatting.
 
A

AB

Steve,

Thanks for the input. The issue was that we were looking for any of a dozen
different customers, all of which might show up with several different names
(depending on their office location). Using the Conditional Formatting I
thought I might end up having a list of +/- 100 names. I ended up finding a
snippet that pointed me in a direction and I came up with the following code:

Sub GroupHeader0_Format()

strShipper = Left([Shipper], 5)

If strShipper = "..." Or ... Then
Me.GroupHeader0.BackColor = vbYellow
Else
Me.GroupHeader0.BackColor = vbWhite
End If

End Sub
Now, whenever one of these customers is on the report, the entire area
devoted to the details for that customer are on a yellow background.

I hope this is useful to others.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top