Results 1 to 4 of 4
  1. #1
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370

    Question Trouble with Crosstab Query

    Hello all,



    I have a crosstab query built on a select query.

    It works perfect. However, when I try to use the "Between [BegDate] And [EndDate]" it tells me access engine can not recognize it.

    If I use this in the actual select query it works fine. But when I try to use the crosstab query it gives me the above error.

    Also, I'm using two undbound textboxes on a form for [BegDate] and [EndDate]. I have the syntax correct in my select query and it works fine. But it won't work with the crosstab query.


    Anyone experienced this problem before?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    Filter criteria in CROSSTAB is different from other queries. Review http://allenbrowne.com/ser-67.html#Param
    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.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,526
    in a crosstab query YOU MUST DEFINE PARAMETERS in the select query.
    normally you dont need the paramerters in a select query, but CROSSTAB demands it.
    so in the select query, parameters icon on the toolbar,
    put the textboxes
    forms!frmMain!txtBox1 , as date

    etc.
    THEN IT WORKS!

  4. #4
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    How does it know which field I am referencing for the date range?

    One of my fields is FeeReceivedDate, I want the date range to be based on this field.


    EDIT:

    Figured it out, I had to leave the original criteria in my select query, I had removed that.


    Thanks guys

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

Similar Threads

  1. Trouble with Compound Query
    By bxdobs in forum Queries
    Replies: 3
    Last Post: 02-20-2015, 11:42 AM
  2. SQL Query Trouble in Access
    By aglenn in forum Queries
    Replies: 4
    Last Post: 12-18-2013, 06:51 PM
  3. Replies: 2
    Last Post: 08-16-2013, 01:36 AM
  4. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  5. Trouble with Query
    By jbarrum in forum Access
    Replies: 1
    Last Post: 01-13-2010, 04:10 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