Results 1 to 4 of 4
  1. #1
    hawkins is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    82

    Condition based upon shot time format


    I have a text box in which I display a short time in it. I previously created a conditional under the font section that just referenced field of a pre-calculated percentage. I would like to get rid of the pre calculated percentage and just have the conditional do it for me. I have another text box conditional which looks like this: (([SAIFI]/1.43)*100)>100.0001 And (([SAIFI]/1.43)*100)<200.009. Where inbetween 100 and 200 the text box will go yellow. I would like to do the same with CAIDI but instead of the 1.43 it would be [2:03] in short time. Does anyone have any suggestions?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    You want to use the time in a calculation like used with SAIFI and 1.43? Convert the time to decimal hours or minutes. 2:03 would become 2.05 hours or 123.0 minutes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    hawkins is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    82
    Correct, so it would be something like this: (([CAIDI]/(123))*100)>100.0001 And (([CAIDI]/(123))*100)<200.009 . Is there a way to convert the time to minutes within the conditional formatting or would I need to use VBA code to do so?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    x = field name with time values (ex: 2:03) - assuming is a text datatype field

    Val(x)*60 + Val(Mid(x,InStr(x,":")+1)) / 60

    will return 120.05 minutes

    Might be able to include that in the conditional format expression. Makes a long statement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 7
    Last Post: 08-03-2011, 08:00 AM
  2. Printing multiple reports at once based on condition
    By justinwright in forum Reports
    Replies: 24
    Last Post: 04-13-2011, 01:40 PM
  3. Replies: 3
    Last Post: 11-19-2010, 01:48 PM
  4. Update 2 fields based on where condition.
    By Confused in forum Access
    Replies: 2
    Last Post: 11-19-2009, 05:21 PM
  5. Highlighting Report Data Based on a Condition
    By KramerJ in forum Reports
    Replies: 1
    Last Post: 05-29-2009, 10:27 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