Results 1 to 4 of 4
  1. #1
    GoldenOrb is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    5

    Conditional Formatting or VBA for Report Fields

    Hi, pretty new to this stuff but come unstuck with the below.

    I am running a database/ rostering system for +30 staff over a fortnight running 24hrs a day, 7 days a week.
    Now against each person there is 2 fields
    Field 1) type of shift (Shift1 type) if Day, Arvo, Eve, Night + a couple of leave options... AL, LSL and or WL
    Field 2) Start time (Shift1 time) ie 0700, 1500, 1700, 2100.... Now when it is one of the leave options the field in the record is left blank (currently a Date/time field)

    What I want to achieve is when that field 1) displays "WL" field 2 is blank and I want it to input a "X" into field 2) whether it it via a expression through conditional formatting or vba



    Is it possible to achieve this or am I dreaming

    Thanks

    Geoff

  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,652
    Try

    =IIf(Field1 = "WL", "X", Field1)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    GoldenOrb is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    5
    Hi Paul, tried the above and unfortunately it didn't work. Thanks though

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Saving a calculated result requires code.

    Can't save an "X" into a date/time field. X is text, date/time is a type of number field.

    You can calculate the "X" to display on report if conditions met.
    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: 5
    Last Post: 03-14-2013, 01:52 PM
  2. Report Grouping Conditional Formatting?
    By pellissier in forum Reports
    Replies: 5
    Last Post: 02-19-2013, 10:04 AM
  3. Conditional Formatting in a Sub Report
    By cduveE6 in forum Reports
    Replies: 2
    Last Post: 04-03-2012, 01:41 AM
  4. #Name? Conditional Formatting Report
    By stosh59 in forum Reports
    Replies: 5
    Last Post: 01-10-2011, 02:40 PM
  5. Conditional formatting in report
    By RickM in forum Access
    Replies: 1
    Last Post: 09-10-2009, 06:21 PM

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