Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Formating with VBA (2000)

    <img src=/S/jollyroger.gif border=0 alt=jollyroger width=29 height=18>


    Is is possable to do conditional formating of a text box through VB? I want to compare a date field with the current date in a continuous form and set colors according to it's proximity. I can't seem to use date functions with the conditional formatting dialog box - I hope to gain more leverage inside of VB. Is this possable?

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Formating with VBA (2000)

    VBA won't help much, I think. You should set the first dropdown in the Conditional Formatting dialog to "Expression is", and in the second box enter an expression like

    Abs([DateField]-Date())<100

    This condition will be true if the value of the field named DateField is within 100 days of today, represented by Date(). If you have problems with date functions, provide details.

  3. #3
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formating with VBA (2000)

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •