Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2008, 06:41 AM
Registered User
 
Join Date: Sep 2008
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
 
Old September 17th, 2008, 03:02 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old September 18th, 2008, 03:05 AM
Registered User
 
Join Date: Sep 2008
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
 
Old September 19th, 2008, 07:06 AM
Friend of Wrox
 
Join Date: Jun 2003
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





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





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