Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 17th, 2008, 06:41 AM
Registered User
 
Join Date: Sep 2008
Location: Liverpool, , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Balasarius
Default Conditional Formatting in Continuous Forms

Hi All,

I am trying to add some conditional formatting to a continuous form but it is not going well.
I am trying to get the text colour from column record from 'A' to change based on the value in column record 'B'.
sofar I have gone in the conditional formatting of column 'A' and added the expression
Code:
iif([Column_B]=True,1,0)
it doesn't wanna work for me and I am now at a loss of what to try next.

note column 'B' is a tick box

Regards,

Joseph Williams
Reply With Quote
  #2 (permalink)  
Old September 17th, 2008, 03:02 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Welcome to P2P. I don't understand the use of 1 and 0 (zero) as it applies to conditional formatting for colors.

If you're using conditional formatting, then you'd set it in the dialog box that if the cell contents of column A equals to [Column_B] then you'd set the color of the font to some color.

What you wrote here looks more like an iif statement for a control, a query, or VBA... not conditional formatting.



Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
  #3 (permalink)  
Old September 18th, 2008, 03:05 AM
Registered User
 
Join Date: Sep 2008
Location: Liverpool, , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Balasarius
Default

Hi Greg,

IIF statement I got based on another post in the forum I'm not 100% sure it is right

the problem I have is column 'A' is a text field while column 'B' is a tick box.

what I want to happen is the text in column 'A' to change colour if there is a tick from column 'B'.

If it was just a single form I'd do a bit of VBA but with it being a continuous Form if one record triggers the colour change, the colour changes is applied to all records display in the form.


what I am really asking is, Is there a way to colour individual records in a continuous form using my criteria.

Regards,

Joseph Williams
Reply With Quote
  #4 (permalink)  
Old September 19th, 2008, 07:06 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Well column B is a checkbox (true or false, -1 or 0, yes or no). In the form's design view, click the textbox. In there, choose Format > Conditional Formatting. It the dialog that opens up, choose for condition 1: "Expression Is". In the box to the right, type in the name of the field that is the control source for the checkbox, e.g. MyCheckbox like this:

[MyCheckBox] = True

Then enter the formatting you want below that with the buttons.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting jeremy1048 Access 4 July 3rd, 2008 11:20 AM
Conditional formatting vemaju Excel VBA 2 June 6th, 2007 04:41 AM
Conditional Formatting on Subform echovue Access 4 March 3rd, 2006 03:25 AM
Conditional Formatting Corey Access 1 November 8th, 2005 12:18 AM
Continuous Forms Ben Access VBA 2 February 17th, 2004 10:34 AM



All times are GMT -4. The time now is 10:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.