Results 1 to 4 of 4
  1. #1
    tmartin is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Mar 2015
    Posts
    37

    CrossTab Query Help

    I am trying to create a report that has a monthly report that shows the sales for New Business, endorsement, and payments for each employee with a total for that month. I have attached a DB file with A query that is close but not suitable to build a real report. Any suggestions. I need to be able to control the date range from a form


    Tom
    DemoDB.zip

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    On the form , put your 2 text boxes

    txtStart

    txtEnd



    I use 2 queries,

    Q1 is the base query to get the date range and fields needed

    ...where [date] between forms!frmRpts!txtStart and forms!frmRpts!txtEnd



    then Q2 is the crosstab query using Q1.

    NOTE: THE CROSSTAB QUERY MUST HAVE PARAMETERS. Under Query, parameters, fill in

    forms!frmRpts!txtStart date

    forms!frmRpts!txtEnd date



    Otherwise the query will keep asking you for this.

  3. #3
    tmartin is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Mar 2015
    Posts
    37
    I created a query Q1 that used the values from the form to select a range of date. I had the output of the query create a new table called Temp
    Then I modified the query I had and used the temp table instead to produce a result. Its clear that is a real kludge. Could you be more specific on how to resolve this
    issue without creating a temporary table?

    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Building a stable report to run perpetually based on crosstab is not easy. Review http://allenbrowne.com/ser-67.html
    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. Crosstab Query Help
    By bronson_mech in forum Queries
    Replies: 1
    Last Post: 05-31-2014, 10:12 AM
  2. Replies: 2
    Last Post: 04-30-2014, 03:01 PM
  3. Replies: 2
    Last Post: 08-16-2013, 01:36 AM
  4. Crosstab Query Help
    By ksmith in forum Programming
    Replies: 7
    Last Post: 12-01-2010, 07:00 AM
  5. Replies: 1
    Last Post: 07-30-2010, 10:28 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