Results 1 to 6 of 6
  1. #1
    Odixay is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    3

    Report of Rental Dates where the field is blank.


    I want to build an expression from this =DateDiff("d",[Date Acquired],[Off Rent Date]) which will populate today's date where [Off Rent Date] is unpopulated. The off rent date is populated when these items are returned but not until they are sent, I would like this to give me a total number of days rented when I run the report. Any help is appreciated.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    =DateDiff("d",[Date Acquired],Nz([Off Rent Date],Date))

  3. #3
    Odixay is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    3
    When I enter your expression the dates which are populate with an Off Rent still total days, but now the unpopulated fields give an error.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    OK...try:
    =DateDiff("d",[Date Acquired],IIF(IsNull([Off Rent Date]),Date(),[Off Rent Date]))

  5. #5
    Odixay is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    3
    Wow, that one works like a charm. I appreciate you help. Thanks alot!

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You are very welcome.

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

Similar Threads

  1. sorting a field in report
    By Philangr8 in forum Reports
    Replies: 3
    Last Post: 08-26-2009, 05:38 PM
  2. Return blank field depending on quantity
    By anthonyjf in forum Access
    Replies: 1
    Last Post: 04-01-2009, 08:22 AM
  3. Access - car rental relationships
    By ipwn in forum Access
    Replies: 0
    Last Post: 03-09-2009, 07:18 AM
  4. Replies: 1
    Last Post: 09-05-2008, 12:07 PM
  5. report prints blank page at end of report
    By darrellx in forum Forms
    Replies: 0
    Last Post: 03-14-2006, 08:51 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