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:
    190
    fredg
    Nov 21, 2003
  2. Mark A. Sam

    DateDiff

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

    DateDiff error

    Betty K, Jan 5, 2009, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    204
    Betty K
    Jan 5, 2009
  4. Gntlhnds

    RE: DateDiff Error

    Gntlhnds, May 27, 2010, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    302
    Gntlhnds
    May 27, 2010
  5. Daryl S

    RE: DateDiff Error

    Daryl S, May 27, 2010, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    276
    Daryl S
    May 27, 2010
Loading...

Share This Page