Results 1 to 5 of 5
  1. #1
    Nixx1401 is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    Feb 2010
    Location
    Barbados
    Posts
    115

    DateDiff Function


    I am trying to use the DateDiff Function but the text box where the function is located is returning the error #Name?

    This is what I have in the text box
    =DateDiff("d",[dteStartDate],[dteEndDate])

    Attached is the database. In the frmOfficerInfo

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,728
    You have no data in your tables.
    There is nothing to relate.

    What were you expecting to happen? Perhaps there are some options.

  3. #3
    Nixx1401 is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    Feb 2010
    Location
    Barbados
    Posts
    115
    I have inserted some data in the the database and reattach. Sorry for the Inconvenience.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,728
    Your tables are not populated. There is no linking data in the
    tblTransaction.

    Try this query on your TblTransaction
    Code:
    SELECT tblTransaction.[strID#]
    , tblTransaction.dteEntryDate
    , tblTransaction.dteStartDate
    , tblTransaction.dteEndDate
    , DateDiff("d",[dteStartDate],[dteEndDate]) AS Diff
    FROM tblTransaction;
    Your Datediff works.

    To have your main form and sub formed linked, you must have matching data values in theLinkFields.

    Yu need the registration Number populated on the transaction table

  5. #5
    Nixx1401 is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    Feb 2010
    Location
    Barbados
    Posts
    115
    thx included registration number in subform and Date function worked

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

Similar Threads

  1. DateDiff
    By mrkaye in forum Forms
    Replies: 18
    Last Post: 11-19-2010, 08:19 AM
  2. DateDiff
    By ROB in forum Access
    Replies: 2
    Last Post: 10-30-2010, 03:58 AM
  3. How to use DateDiff?
    By teirrah1995 in forum Queries
    Replies: 10
    Last Post: 10-19-2010, 12:07 PM
  4. Need Help with Datediff
    By gonzod in forum Access
    Replies: 5
    Last Post: 08-26-2010, 02:29 PM
  5. DateDiff function
    By Scott R in forum Reports
    Replies: 5
    Last Post: 12-03-2008, 07:32 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