Results 1 to 10 of 10
  1. #1
    bold01 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    13

    flag in access

    Hi everyone,



    I have a task to create something in access table.

    I sort of need an update on fields in column "time scheduled" to reflect on fields in column "tolerance" such that

    IF field "time completed" is blank, then field "tolerance" should be red.

    IF date difference between field "time schedule" and field "time completed" is greater or equal to 7,then field "tolerance" should be RED, else Green.

    I know this could be done using macro or Visual basic but am not so conversant with their use. someone please help me....Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    The simplest tool for what you want to do is called Conditional Formatting, available on both forms and reports. Play with it and see if you get your result.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bold01 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    13

    thnks

    thanks for your reply pbaldy, i'll sure give it a try and hope i'll get what i want.

    bold01

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    No problem, and post back if you get stuck. Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    bold01 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    13
    thanks really. I used the conditional formating and it did worked :-) however, i still don't know how to go about making a field calculate the difference between two dates in another fields. more help would be appreciated on this

    bold01

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    I don't have 2010 in front of me, but this should still work. You'd use Expression Is instead of Field Value Is, with an expression like:

    DateDiff("d",[OneField],[TheOtherField])>7
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    bold01 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    13
    thanks pbaldy, you've been of great help. i finally did it before i got your mail. I simply did the calculation in the query using Difference: Round([date1]-[date2], 2) and it worked. thanks anyway. But the last part now is to make the null fields turn red using conditional formatting. what expression do you think i could apply on this? thanks

    bold01

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    I use Expression Is and an expression like:

    IsNull([txtReqDate])
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    bold01 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    13
    perfect. that did it thanks.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    No problem, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query to flag daily change in order status
    By Relyuchs in forum Queries
    Replies: 1
    Last Post: 01-21-2011, 02:53 PM
  2. Proper way to handle a flag system
    By trb5016 in forum Access
    Replies: 0
    Last Post: 08-25-2010, 01:20 PM
  3. Flag A Data Block
    By JohnBoy in forum Programming
    Replies: 7
    Last Post: 06-29-2010, 01:18 PM
  4. Multi-select listbox and update flag in table
    By Suresh in forum Programming
    Replies: 0
    Last Post: 12-19-2007, 01:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums