Results 1 to 4 of 4
  1. #1
    Lilian is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    2

    Error management in queries

    Hi everyone,

    I'm in trouble with date functions Month().
    I want to use it on a field that may contain a date yyyy-mm-dd or may be void.
    My problem is that when I want to import the query result in an Excel sheet I get an error (impossible to access database). When I make a try on a database completely filled with date the importation is a success.

    Do you have any idea about how to proceed ?

    Thanks in advance !

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    How about this type of thing:

    IIf(IsDate(FieldName), Month(FieldName), 0)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Lilian is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    2
    Fantastic It works !

    thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Happy to help, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. db FOR fleet management
    By nsr1989 in forum Database Design
    Replies: 3
    Last Post: 02-10-2011, 07:32 AM
  2. Data type mismatch error on all of my queries!
    By MarkGLyons in forum Queries
    Replies: 3
    Last Post: 12-27-2010, 01:27 PM
  3. Error check in queries
    By devesa in forum Access
    Replies: 14
    Last Post: 05-07-2010, 09:39 PM
  4. File Management
    By Lindsur in forum Database Design
    Replies: 1
    Last Post: 04-14-2010, 01:58 PM
  5. Network management
    By pandreas in forum Queries
    Replies: 0
    Last Post: 06-12-2009, 03:54 PM

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