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  

Is there a way to create color labels based on a query in access?



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2006, 11:41 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Is there a way to create color labels based on a query in access?

I have created a label report, but I would like to add a different color
based on the "Records Series" field. Ie. any records assigned to ACC would
be Blue in either font color or highlighted in blue, or any records assgined
to LGL would be Red.

Thanks!
  #2  
Old March 22nd, 2006, 01:05 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Is there a way to create color labels based on a query in access?

On Tue, 21 Mar 2006 15:41:27 -0800, Ember wrote:

I have created a label report, but I would like to add a different color
based on the "Records Series" field. Ie. any records assigned to ACC would
be Blue in either font color or highlighted in blue, or any records assgined
to LGL would be Red.

Thanks!

Which Access Version.
If your version of Access supports Conditional Formatting:

Select on the label. Click on Format + Conditional formatting.
Set Condition1 to Expression Is.
Set the expression to:
[RecordSeries] ="ACC"
Select your ForeColor.
Click Add.
Set Condition2 to Expression Is.
Set the Expression to:
[RecordSeries] ="LGL"
Select this condition's ForeColor.
Click OK to save the changes.

Or..
Using any version of Access, by code in the Detail Format event.
If [RecordSeries] = "ACC" Then
[LabelName].ForeColor = vbBlue
Elseif [RecordSeries] = "LGL" Then
[LabelName].ForeColor = vbRed
Else
[LabelName].ForeColor = vbBlack
End If
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old March 22nd, 2006, 04:20 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Is there a way to create color labels based on a query in acce

What does [LabelName] represent?

Ember

"fredg" wrote:

On Tue, 21 Mar 2006 15:41:27 -0800, Ember wrote:

I have created a label report, but I would like to add a different color
based on the "Records Series" field. Ie. any records assigned to ACC would
be Blue in either font color or highlighted in blue, or any records assgined
to LGL would be Red.

Thanks!

Which Access Version.
If your version of Access supports Conditional Formatting:

Select on the label. Click on Format + Conditional formatting.
Set Condition1 to Expression Is.
Set the expression to:
[RecordSeries] ="ACC"
Select your ForeColor.
Click Add.
Set Condition2 to Expression Is.
Set the Expression to:
[RecordSeries] ="LGL"
Select this condition's ForeColor.
Click OK to save the changes.

Or..
Using any version of Access, by code in the Detail Format event.
If [RecordSeries] = "ACC" Then
[LabelName].ForeColor = vbBlue
Elseif [RecordSeries] = "LGL" Then
[LabelName].ForeColor = vbRed
Else
[LabelName].ForeColor = vbBlack
End If
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

  #4  
Old March 22nd, 2006, 04:37 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Is there a way to create color labels based on a query in acce

Never mind, I figured it out!!! Thanks "fredg", I really appreciate the post!

Ember

"Ember" wrote:

What does [LabelName] represent?

Ember

"fredg" wrote:

On Tue, 21 Mar 2006 15:41:27 -0800, Ember wrote:

I have created a label report, but I would like to add a different color
based on the "Records Series" field. Ie. any records assigned to ACC would
be Blue in either font color or highlighted in blue, or any records assgined
to LGL would be Red.

Thanks!

Which Access Version.
If your version of Access supports Conditional Formatting:

Select on the label. Click on Format + Conditional formatting.
Set Condition1 to Expression Is.
Set the expression to:
[RecordSeries] ="ACC"
Select your ForeColor.
Click Add.
Set Condition2 to Expression Is.
Set the Expression to:
[RecordSeries] ="LGL"
Select this condition's ForeColor.
Click OK to save the changes.

Or..
Using any version of Access, by code in the Detail Format event.
If [RecordSeries] = "ACC" Then
[LabelName].ForeColor = vbBlue
Elseif [RecordSeries] = "LGL" Then
[LabelName].ForeColor = vbRed
Else
[LabelName].ForeColor = vbBlack
End If
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2002 vs. 2003 Neil General Discussions 51 February 16th, 2006 10:18 PM
2002 vs 2003 Patrick Stubbin General Discussion 2 May 17th, 2005 07:27 AM
Office 2003 installation problem, log file attached.... Ryan Setup, Installing & Configuration 0 January 20th, 2005 06:57 PM
Union Query Not Returning A Value Jeff G Running & Setting Up Queries 2 October 19th, 2004 05:47 PM
Newbie? Do I use Report or Query John Egan New Users 11 June 28th, 2004 08:31 PM


All times are GMT +1. The time now is 05:17 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.