Answered by:
Can you color the record items (lines) in a continuous form?

Question
-
Using Access 2003 sp3.
I have an application which, among other things, lists organizations on a continuous form.
These organizations have incurred costs. Some have been invoiced, some have paid.What would be a nice touch to my user interface would be to list the organizations:
- in red if they have not been invoiced.
- in yellow if they have been invoiced but not yet paid.
- in green if they have been invoiced and have paid.However, I can't find an event trigger where I can insert the code which changes the ForeColor of the text boxes in the list depending on the status of the organization's financial history. So far every event which triggers my code changes the color of all of the boxes on the list, not an individual box on a line.
Any ideas on how this could be accomplished?
Thanks in advance for any help. --Fred
Wednesday, August 24, 2016 7:01 PM
Answers
-
Hi Fred. The simplest approach for you, I think, is to use Conditional Formatting. Have you tried it?
Here's the only link I could find for 2003 (most of them are for newer versions):
MS Access 2003: Conditional Formatting
- Edited by .theDBguy Wednesday, August 24, 2016 7:21 PM Added link
- Proposed as answer by Edward8520Microsoft contingent staff Thursday, August 25, 2016 2:44 AM
- Marked as answer by Edward8520Microsoft contingent staff Monday, September 5, 2016 7:42 AM
Wednesday, August 24, 2016 7:14 PM -
Hi Fred. When you said "class module," is it a standalone module or part of the form's class module? I don't think you can use the "Me" keyword in a Conditional Formatting expression. If you want to use a function in a standard module, the CF expression might look something like:
Expression Is: FunctionName()=True
Or something like that...
- Proposed as answer by Edward8520Microsoft contingent staff Tuesday, August 30, 2016 8:46 AM
- Marked as answer by Edward8520Microsoft contingent staff Monday, September 5, 2016 7:42 AM
Thursday, August 25, 2016 6:03 PM
All replies
-
Hi Fred. The simplest approach for you, I think, is to use Conditional Formatting. Have you tried it?
Here's the only link I could find for 2003 (most of them are for newer versions):
MS Access 2003: Conditional Formatting
- Edited by .theDBguy Wednesday, August 24, 2016 7:21 PM Added link
- Proposed as answer by Edward8520Microsoft contingent staff Thursday, August 25, 2016 2:44 AM
- Marked as answer by Edward8520Microsoft contingent staff Monday, September 5, 2016 7:42 AM
Wednesday, August 24, 2016 7:14 PM -
Thanks DBguy, I am giving this a try, though so far no luck.
I tried 3 'expression is' conditions, and used the vba function defined in a class module 'dg':
me.parent.dg.financial_status(me.id)=1 or =2 or =3 (one on each of the 'expression is' lines).
So far nothing happens, but I will play around with this and report back if I get this to work.
Thanks!
Thursday, August 25, 2016 3:48 PM -
Hi Fred. When you said "class module," is it a standalone module or part of the form's class module? I don't think you can use the "Me" keyword in a Conditional Formatting expression. If you want to use a function in a standard module, the CF expression might look something like:
Expression Is: FunctionName()=True
Or something like that...
- Proposed as answer by Edward8520Microsoft contingent staff Tuesday, August 30, 2016 8:46 AM
- Marked as answer by Edward8520Microsoft contingent staff Monday, September 5, 2016 7:42 AM
Thursday, August 25, 2016 6:03 PM