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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Conditional Formatting
Question for Stephan Lebans please... is there any circumstances when CF
doesn't work? I have copied your modules and form code to my database but it doesn't change the background colour of the record. It is a subform I'm working on but the code is in the subforms events so me.fieldname should work. I've also tried the other method with me.txtbackground control on my form, so I don't need to tweak your code at all. I can't see any difference than yours except yours work and mine doesn't! It runs without any errors, it just doesn't change colour :-(. |
#2
|
|||
|
|||
Conditional Formatting
Also what I'd actually like to do is change the colour of a specific field
(or the whole row if this is not possible) if the values do not equal the values alongside in another subform (key is Territory). Is this possible? "Sue" Question for Stephan Lebans please... is there any circumstances when CF doesn't work? I have copied your modules and form code to my database but it doesn't change the background colour of the record. It is a subform I'm working on but the code is in the subforms events so me.fieldname should work. I've also tried the other method with me.txtbackground control on my form, so I don't need to tweak your code at all. I can't see any difference than yours except yours work and mine doesn't! It runs without any errors, it just doesn't change colour :-(. |
#3
|
|||
|
|||
Conditional Formatting
Stephan no longer works with Access, so I'm afraid there's no chance that
he's going to see this request. You'll need to provide more information for us to be able to help you. What version of Access would be a good start... -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Sue" wrote in message ... Question for Stephan Lebans please... is there any circumstances when CF doesn't work? I have copied your modules and form code to my database but it doesn't change the background colour of the record. It is a subform I'm working on but the code is in the subforms events so me.fieldname should work. I've also tried the other method with me.txtbackground control on my form, so I don't need to tweak your code at all. I can't see any difference than yours except yours work and mine doesn't! It runs without any errors, it just doesn't change colour :-(. |
#4
|
|||
|
|||
Conditional Formatting
Thanks Doug. I use Access 2003 Sp3.
I've since tried it on a completely new and different form (with a different record source) just as a test, and that worked (sort of!). I copied Stephan's code into a new form and used a numeric key (same as Stephan's example DB). The rows changed colour as expected. The key on my continuous form though is not numeric - it is text. Maybe this is the problem? I tried changing this on the test and that was when it all went pear shaped ie stopped changing colour. So, at the moment I've removed all coding etc and abandoned this. But it would be good if I could get it to work :-( I don't know how much info you need but I will try to give you the scenario to help understand what I'm doing... Basically, I have a form with two continuous subforms on it which are displayed side by side. They are linked to the main form by a 'Period' key eg 2009Q4. On subform A I have a list of countries (Territory being the key in both subforms) and a few calculated fields from a query which display a total number of days. On subform B I have the same countries listed again but the number of days fields can be amended by the user. Subform A is a guideline, Subform B is what we actually need to achieve. As the user moves through the records on Subform B I have coded it so that subform A sync's and has the same Territory as the current record. What I would like is for both current records to be 'highlighted' (say in yellow) AND if the total days differs in some of the fields - I want just these fields to display in a different colour so it is immediately obvious to the user that the values have been changed. If individual fields can't be done in continuous forms, then the row to be a different colour in subform B. Make sense? ;-). Sorry hard to describe without seeing images maybe... Cheers "Douglas J. Steele" Stephan no longer works with Access, so I'm afraid there's no chance that he's going to see this request. You'll need to provide more information for us to be able to help you. What version of Access would be a good start... -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Sue" Question for Stephan Lebans please... is there any circumstances when CF doesn't work? I have copied your modules and form code to my database but it doesn't change the background colour of the record. It is a subform I'm working on but the code is in the subforms events so me.fieldname should work. I've also tried the other method with me.txtbackground control on my form, so I don't need to tweak your code at all. I can't see any difference than yours except yours work and mine doesn't! It runs without any errors, it just doesn't change colour :-(. |
#5
|
|||
|
|||
Conditional Formatting
On Thu, 11 Feb 2010 17:31:04 -0000, "Sue" wrote:
The key on my continuous form though is not numeric - it is text. Maybe this is the problem? I tried changing this on the test and that was when it all went pear shaped ie stopped changing colour. Quite possibly: post the code. If it's using a criterion based on the field it probably needs to be delmited by quotemarks (Text fields need ' or " delimiters, Number fields have no delimiter). -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|