Results 1 to 4 of 4
  1. #1
    accesskid is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    17

    Question Help with syntax

    I need to work out a new field, called status and what needs to be behind it as in the layout is shown below



    Target Date = Today then = "New", If Target Date < Today then "OverDue" Else "Outstanding".

    If anyone knows what syntax code i need, help would be much appreciated

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Hi

    Is this a new field in a table or a new textbox on a form?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    accesskid is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    17
    Hi,

    It isnt actually within access, but i assume the syntax will be the same within report builder ?

    I am making a report, this will be a calcultated field.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Hi

    I'm still not sure about what you are doing but I think you need a nested IIF expression .

    You may like to try this:
    IIF([Target Date] = Date(), "New", IIF([Target Date] < Date(),"OverDue", "Outstanding". ))

    If this is the Control Source of a control it will need to start with an = sign
    =IIF([Target Date] = Date(), "New", IIF([Target Date] < Date(),"OverDue", "Outstanding". ))
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. SQL syntax
    By jgelpi16 in forum Programming
    Replies: 2
    Last Post: 05-04-2011, 08:32 AM
  2. SQL syntax
    By dssrun in forum Queries
    Replies: 4
    Last Post: 04-15-2011, 01:06 PM
  3. Help with syntax
    By GWB in forum Queries
    Replies: 4
    Last Post: 01-26-2011, 03:33 PM
  4. Incomplete Syntax Clause (syntax error)
    By ajetrumpet in forum Programming
    Replies: 4
    Last Post: 09-11-2010, 10:47 AM
  5. Please help SQL Syntax
    By jordanturner in forum Access
    Replies: 4
    Last Post: 09-02-2010, 08:05 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