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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Cliff Waters

    DateDiff

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

    DateDiff

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

    DateDiff

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

    DateDiff Troubles

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

    DateDiff

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

    Seconds & DateDiff

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

    DateDiff Expression

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

    DateDiff error

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