Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231

    Unanswered: (RESOLVED) Can I change individual record attributes on a form?

    My program displays records in a continuous sheet, making a checklist that a person can scroll through and check one off when it's complete. On each record - in addition to other fields - i have a textbox saying when something is due, and another one that automatically fills in when the user clicks the checkbox to indicate project completion. The goal is to be able to compare the two dates, and if the date is later than the date the project was due by to turn the automatically inserted date red.
    So i've got fldDate (it's a textbox) which is the automatically inserted date, and txtDue. is there a way to do something like:

    Code:
     if fldDate>txtDue then
       flddate.ForeColor=vbRed
     else
       fldDate.ForeColor=vbBlack
     end if
    the expression here is evaluated correctly, but of course changes the forecolor to red on ALL the fldDate boxes. any way to single out a record?

    sorry for restating myself three or four times, just trying to be clear. thanks for the help.
    Last edited by jmahaffie; 04-12-04 at 12:08.

  2. #2
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Re: Can I change individual record attributes on a form?

    I'm sure there's a way to programatically do this, however, if you're using Acc2000 or later...I believe you can use Conditional Formatting. I don't think Acc97 had this feature but can't remember.

    Just a right click on the text box, then Conditional Formatting.

    Hope that helps.

  3. #3
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231

    Thumbs up Re: Can I change individual record attributes on a form?

    Originally posted by cpgospi
    I'm sure there's a way to programatically do this, however, if you're using Acc2000 or later...I believe you can use Conditional Formatting. I don't think Acc97 had this feature but can't remember.

    Just a right click on the text box, then Conditional Formatting.

    Hope that helps.
    thanks for the reply. i'm kind of new to access, so i'd never seen conditional formatting. that was exactly what i needed. thanks,
    Justin
    Last edited by jmahaffie; 04-12-04 at 12:06.

  4. #4
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Re: Can I change individual record attributes on a form?

    Originally posted by jmahaffie
    thanks for the reply. i'm kind of new to access, so i'd never seen conditional formatting. that was exactly what i needed. thanks,
    Justin
    I just stumbled onto it a couple of weeks ago, after working with Access for some time. Handy little tool. Glad it helped.

    CP

Posting Permissions

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