A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Conditional Formatting Programming



 
 
Thread Tools Display Modes
  #1  
Old July 21st, 2009, 08:02 PM posted to microsoft.public.access.reports
LA Lawyer
external usenet poster
 
Posts: 13
Default Conditional Formatting Programming

In Access 2007, I want to program the detail fields in a report so that they
will be bolding when the amount field is more than $500.

I am using a form to open the report so this has to be done through VBA.

How is that done?


  #2  
Old July 21st, 2009, 08:25 PM posted to microsoft.public.access.reports
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Conditional Formatting Programming

LA Lawyer,
That can be handled by Conditional Formatting. In design mode,
highlight the field you want to Bold, and select Format/Conditional
Formatting from the menu bar.

Expression Is [YourNum] 500

And then select the Bold button.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"LA Lawyer" wrote in message
...
In Access 2007, I want to program the detail fields in a report so that
they will be bolding when the amount field is more than $500.

I am using a form to open the report so this has to be done through VBA.

How is that done?



  #3  
Old July 21st, 2009, 08:45 PM posted to microsoft.public.access.reports
LA Lawyer
external usenet poster
 
Posts: 13
Default Conditional Formatting Programming

Yes, I understand that.

However, I am using the report form for different purposes and sometimes I
want the bolding to be added and sometimes not.

That's why I need a VBA snippet to turn the conditional formatting on and
off.
"Al Campagna" wrote in message
...
LA Lawyer,
That can be handled by Conditional Formatting. In design mode,
highlight the field you want to Bold, and select Format/Conditional
Formatting from the menu bar.

Expression Is [YourNum] 500

And then select the Bold button.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"LA Lawyer" wrote in message
...
In Access 2007, I want to program the detail fields in a report so that
they will be bolding when the amount field is more than $500.

I am using a form to open the report so this has to be done through VBA.

How is that done?





  #4  
Old July 21st, 2009, 09:26 PM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default Conditional Formatting Programming

On Tue, 21 Jul 2009 12:45:52 -0700, LA Lawyer wrote:

Yes, I understand that.

However, I am using the report form for different purposes and sometimes I
want the bolding to be added and sometimes not.

That's why I need a VBA snippet to turn the conditional formatting on and
off.
"Al Campagna" wrote in message
...
LA Lawyer,
That can be handled by Conditional Formatting. In design mode,
highlight the field you want to Bold, and select Format/Conditional
Formatting from the menu bar.

Expression Is [YourNum] 500

And then select the Bold button.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"LA Lawyer" wrote in message
...
In Access 2007, I want to program the detail fields in a report so that
they will be bolding when the amount field is more than $500.

I am using a form to open the report so this has to be done through VBA.

How is that done?




Code the Detail Format event:
Me.[ControlName].FontBold = Me.[OtherControlName] 500

If you wish to be able to use the exact same report and have the
option to turn Bold on or off from a form, add a check box to the
form. Change the code in the report to:
Me.[ControlName].FontBold = Me.[OtherControlName] 500 and
forms!FormName!CheckName = -1
Placing a check in the form check box will turn Bold on if the value
is 500. Remove the check and the report control will not be bold even
if the other control's value is 500.
Remember, however, the form must be open when the report is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #5  
Old July 22nd, 2009, 03:19 AM posted to microsoft.public.access.reports
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Conditional Formatting Programming

LA Lawyer,
sometimes I want the bolding to be added and sometimes not.

A whole different question...
Fred G has the solution using the OnFormat event of the report.
--
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"LA Lawyer" wrote in message
...
Yes, I understand that.

However, I am using the report form for different purposes and sometimes
I want the bolding to be added and sometimes not.

That's why I need a VBA snippet to turn the conditional formatting on and
off.
"Al Campagna" wrote in message
...
LA Lawyer,
That can be handled by Conditional Formatting. In design mode,
highlight the field you want to Bold, and select Format/Conditional
Formatting from the menu bar.

Expression Is [YourNum] 500

And then select the Bold button.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

"LA Lawyer" wrote in message
...
In Access 2007, I want to program the detail fields in a report so that
they will be bolding when the amount field is more than $500.

I am using a form to open the report so this has to be done through VBA.

How is that done?







  #6  
Old July 26th, 2009, 11:41 PM posted to microsoft.public.access.reports
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default Conditional Formatting Programming

L.A. Lawyer; is saying "Thank you" too high a price to pay for
valuable services rendered? The responses you've received in this
thread alone saved you from many hours to many days of research.

Your original post in this thread was promptly answered with a
solution that was right on the mark. Your response was "Oh, yes, I
understand that but what I really want (but didn't tell you) is that
it not only do that but also do this other thing".

Again you received a response that was right on the mark. This time
you not only didn't say "Thank you", you didn't even acknowledge it.

I suggest that you visit www.mvps.org/access and read "Netiquette".
It explains a lot of the quirky behaviors and folkways and
expectations of those of us who hang out in these Access newsgroups.
These newsgroups are provided by microsoft so that they and their
customers get the benefits of peer support from developers at all
levels to developers at all levels. All service here is provided
free of charge by unpaid volunteers. There is one persistent troll
who attempts to prey on newbies. A few interlopers sometimes try it
too. Legitimate service here is limited to helping people over a
single technical hurdle or issue per thread and occasional general
concept and general knowledge about the product at hand. Service for
hire and free consulting and development are not on offer here

Your questions about Access issues are welcome. First make a good
effort to solve your issues yourself and learn to use the resources at
your disposal. Many of the MVPs are the products of self-directed
study: Help files, these newsgroups and (libraries of) books and
newsletters and magazines,

We're not an homogeneous group. We all have different styles of
approach and completeness. We all want to help budding developers
become journeymen and craftsmen/artisans (choose your gender).

HTH
--
-Larry-
--

"LA Lawyer" wrote in message
...
In Access 2007, I want to program the detail fields in a report so

that they
will be bolding when the amount field is more than $500.

I am using a form to open the report so this has to be done through

VBA.

How is that done?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.