Results 1 to 2 of 2
  1. #1
    panoss is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2014
    Posts
    59

    Query with criteria a date field of a form

    I want to put a date field of a form as a criteria in a query in the query builder.
    How do I do this?
    I tried: Between [Forms]![Sellers]![DateFrom] And [Forms]![Sellers]![DateTo]
    But no success.


    (maybe it has to do with the format? In the form I use dd/mm/yyyy. Or that it may also contain and time??)

    Edit: false alarm! It works fine, I had made a mistake in the field's name.
    Last edited by panoss; 12-22-2014 at 07:14 AM.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    That is the correct syntax. I use it all the time with success.
    HOWEVER, if you are using time in the field, then yes, build a query that filters only the date format in the field, THEN put in your criteria.

    select format([InDate],"dd/mm/yyyy") as StartDate, where format([InDate],"dd/mm/yyyy") between start and end

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

Similar Threads

  1. Replies: 2
    Last Post: 06-09-2014, 11:23 AM
  2. Replies: 1
    Last Post: 06-09-2014, 11:17 AM
  3. Replies: 9
    Last Post: 02-21-2014, 06:02 PM
  4. Replies: 3
    Last Post: 03-14-2012, 10:31 AM
  5. Replies: 2
    Last Post: 07-12-2011, 07:53 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