Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    teresamichele is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    23
    I didn't think to link it to the field in the same report. Whoops!

    I did this - =IIf(DateDiff("d",[DateDue],Date())<14,"Urgent",IIf(DateDiff("d",[DateDue],Date())<30,"A","B"))



    However, it came up with Urgent, even though the date due is 12/10/10, which is obviously more than 14 days.

    Thoughts? Eventually I'm going to get really good at this and help people too but for now I'm just confused!

  2. #17
    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 reversing them (I was thinking over due, like due date in the past):

    DateDiff("d", Date(), [DateDue])
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #18
    teresamichele is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    23
    Now I feel sheepish. That did it!

    Thank you so much for taking the time to help me - I really appreciate it!

  4. #19
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help. I should have picked up on the date thing. Your problem is that it was returning a negative number, so everything was meeting the first IIf() test (like 2 minus 4 instead of 4 minus 2).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Populate access forms from excel
    By STAN in forum Forms
    Replies: 4
    Last Post: 07-12-2010, 12:08 AM
  2. Replies: 0
    Last Post: 05-12-2010, 10:08 PM
  3. Linking Table Data on Forms
    By P5C768 in forum Database Design
    Replies: 12
    Last Post: 03-22-2010, 09:42 AM
  4. populate table w/ external data
    By tlittell in forum Programming
    Replies: 2
    Last Post: 02-20-2010, 08:29 AM
  5. form data will not populate in table
    By bobsakamato in forum Access
    Replies: 1
    Last Post: 09-06-2009, 07:25 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