DateDiff Error

Discussion in 'Microsoft Access Forms' started by Gntlhnds, May 27, 2010.

  1. Gntlhnds

    Gntlhnds Guest

    I have two identical forms, each with a DOB field and an Age field. I'm
    using the following expression to display the age in each form:

    =DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))

    On one form, it works perfectly. In the other form, I get a #Name? error.
    Why would it work in one form, but not the other? I was wondering if it was
    a formatting difference for the DOB field, but that isn't it. Thanks for
    thelp.
     
    Gntlhnds, May 27, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cliff Waters

    DateDiff

    Cliff Waters, Nov 21, 2003, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    292
    fredg
    Nov 21, 2003
  2. Mark A. Sam

    DateDiff

    Mark A. Sam, Jan 7, 2004, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    361
    Peter R. Fletcher
    Jan 10, 2004
  3. GMJ

    DateDiff

    GMJ, Jan 9, 2004, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    257
    John Vinson
    Jan 10, 2004
  4. Marie

    DateDiff Troubles

    Marie, Feb 17, 2004, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    317
    Joan Wild
    Feb 17, 2004
  5. Gee

    DateDiff

    Gee, Feb 25, 2004, in forum: Microsoft Access Forms
    Replies:
    9
    Views:
    263
    Jeff Conrad
    Feb 26, 2004
  6. Bruce Rodtnick

    Seconds & DateDiff

    Bruce Rodtnick, Mar 11, 2004, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    883
    John Vinson
    Mar 11, 2004
  7. Mike S.

    DateDiff Expression

    Mike S., Apr 10, 2004, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    433
    Mike S.
    Apr 10, 2004
  8. Betty K

    DateDiff error

    Betty K, Jan 5, 2009, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    233
    Betty K
    Jan 5, 2009
Loading...