none
Can you color the record items (lines) in a continuous form? RRS feed

  • 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

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

    Hope it helps...


    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...

    Thursday, August 25, 2016 6:03 PM