Making selected records in a report bold

T

Thomas Campitelli

Howdy Folks,

I have an Access report and I would like to make certain records bold
based on their value. Here's my problem. If a record has a less than
sign in it (<), I want it to be left alone. Anything that doesn't have a
less than sign should be displayed in boldface.

I tried pulling this off with conditional formatting, but I was not able
to get it to work. Since my values are text, I think I may need to use
VBA. In fact, I'd love to use some code, but I don't know enough about
how to accomplish what I want. Text boxes do not have events associated
with them, at least as far as I can tell. There is an "On Format" event
in the Detail section properties that looks promising.

Does anyone have any ideas or resources they could point me toward?
Thanks in advance.
 
T

Thomas Campitelli

Never mind. I just discovered the "Expression Is" part of conditional
formatting. All is well now.
 
B

Bill

Thomas,
The OnFormat event for the Detail section does in fact "fire"
for each record in the report. So, your VBA code can
inspect the field of interest and set the text box property
as desired.

I'm not sure what is peculiar about your data that you were
unable to use conditional formatting. A simple function placed
in the VBA code sheet of your report could perform any needed
inspection and return a simple TRUE/FALSE condition upon
which you could conditionally format the text box involved.

Bill
 
T

Thomas Campitelli

There was nothing that irregular about my data. I just didn't grasp how
to use the conditional formatting function correctly. I have it working
now. I am going to post another problem that is a bit trickier shortly.

Thanks,

Tom
 

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