Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2007
    Posts
    15

    Unanswered: plz help !! Undefined function 'Date' in expression

    please help i got mad !!!!!!

    i was using date() function to get the current in access query & vba and both doesn't work and i got this msg


    Undefined function 'Date' in expression

    i tried all the tricks in the internet about fix the ref. and no way .still as it is

    any new tips plz

    or another way to get the current date

    thanks
    all
    bye

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by MrC
    please help i got mad !!!!!!
    i know exactly how that feels !!!!!!!!!!!!!!!!!


    Quote Originally Posted by MrC
    Undefined function 'Date' in expression
    you know what might be an interesting idea? if we could actually see what that expression was
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Just a guess but have you checked your References? (i.e. in the vba editor viewing the code, select Tools -> References.) If any of the References have the word "Missing" by them, uncheck that Reference and select the correct Reference.) Typical References I have are the following:

    Visual Basic for Applications
    Microsoft Access 10.0 Object Library
    OLE Automation
    Microsoft ActiveX Data Objects 2.1 Library
    Microsoft DAO 3.51 Object Library

    For example, if Microsoft DAO 3.51 Object Library says "Missing" by it, uncheck it and see if there is a Microsoft DAO 3.6 Object Library and select that one.
    Last edited by pkstormy; 09-15-07 at 23:27.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    Have you got a feild name call Date
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #5
    Join Date
    Nov 2003
    Posts
    1,487
    I've come accross this before (a long long time ago)...and what myle has stated, was ultimatly the root cause. Make sure you don't have any Fields or Form Controls named Date. I've seen DB's where it works and I've seen DB's where it just simply wont.

    or just use Now() and format it the way you want.

    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  6. #6
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    also other Words like

    date
    type
    group
    .....

    can get you into trouble also

    For date feilds

    pdate = paid date
    jdate = join date
    bdate = billing date
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Reserved words

    Here's a list of reserved words.
    Attached Files Attached Files
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Paul:
    Perhaps you should post the reserved words (not in word docs) in the FAQ thread?
    George
    Home | Blog

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by georgev
    Paul:
    Perhaps you should post the reserved words (not in word docs) in the FAQ thread?

    I rather think you find he already has done that (in the code bank)..

    at around 02:50 BST this morning...

    whassup George......?
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I wasn't sure if it was better to post it in the code bank or FAQ thread. Is the FAQ thread actively used by a lot of people? I know we talked about revamping it a bit.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  11. #11
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Oh dear, so he did!
    I only check my notifications once or twice a day (very rarely on a morning) so I simply missed it!

    I'd argue it was more suited to the FAQ section but it's Pauls call.
    And yep - I keep meaning to write some stuff for the FAQ section - I just never get round to it! I think it needs some more attention
    George
    Home | Blog

  12. #12
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I've been meaning to also write some stuff for the FAQ but I also never get round to it. I can put it in both the FAQ and the code bank (until the FAQ get's revamped.)

    I just can't believe I was still awake at 02:50 am. (didn't realize it was that late/early in the am.)
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  13. #13
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Acckk - I can't attach docs in the FAQ.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •