Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-11-2013, 12:08 PM   #1
jordankoal
Newly Registered User
 
Join Date: Sep 2013
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
jordankoal is on a distinguished road
If statement that checks color of background

I have a report. In this report I have a start date and an end date. I also have a date that is going to be checked. The report checks to see if the date the user entered on a different form is between the start and end date of an individual. if it is, a txt box at the end of the line will turn red. If it isn't the box will stay default of green.

What I would like to do is not even show the lines that have a green box. I want to just show the lines that have boxes as red.

I looked into If statements but I'm not quite sure what event I should put them on, nor am I certain I have the syntax right.

I had it:
If (lblAvailability.BackColor = "#CCB13D" Then
txt1.Visible = False
and so on... making all the txt fields invisible. I would rather have them not even show up because I'm pretty sure invisible things still take up room.
End If

Any Suggestions???

jordankoal is offline   Reply With Quote
Old 09-11-2013, 03:54 PM   #2
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,326
Thanks: 40
Thanked 3,666 Times in 3,535 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: If statement that checks color of background

Quote:
What I would like to do is not even show the lines that have a green box. I want to just show the lines that have boxes as red.
If you don't want the line to appear at all why not modify the recordsource to your report with a criteria which uses the same formula which sets the background color of your backcolor to exclude the 'green' records
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
Reply

Tags
conditional formatting , if statement , reports

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background Color BobbyGraves Forms 2 01-30-2013 09:20 AM
Permentant VBA background table checks micksitup Modules & VBA 6 05-10-2007 02:30 AM
background color fathi Forms 6 12-15-2006 09:01 AM
Background Color bionicman Forms 3 08-27-2004 06:57 PM
Background color????? rmacleod Forms 2 07-15-2004 10:04 AM




All times are GMT -8. The time now is 12:33 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World