Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2015
    Posts
    1

    Message prompted date query criteria

    I am trying to run a report based on user entered start and end dates. The query is based on another query that first outputs max values on completed dates.


    The second query runs just fine when I put the start/end dates directly into the criteria but I need the report to be based on user choosen dates. I am using [Start Date] and [End Date] in the criteria to generate the prompts. The query runs using the prompts but I get dates outside the min/max parameters.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I don't use parameterized queries. I use VBA to construct filter criteria and pass to report when opening.

    DoCmd.OpenReport "report name", , , "[datefield] BETWEEN #" & Me.tbxStart & "# AND #" & Me.tbxEnd & "#"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 20
    Last Post: 01-13-2015, 02:23 PM
  2. Replies: 2
    Last Post: 04-04-2013, 03:13 PM
  3. Replies: 3
    Last Post: 08-21-2012, 03:05 PM
  4. Query using Date() criteria
    By Bruce in forum Queries
    Replies: 27
    Last Post: 01-30-2012, 01:15 PM
  5. Query Date Criteria
    By svanicek in forum Access
    Replies: 1
    Last Post: 07-09-2010, 11:13 AM

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