• Access crosstab qry question (Access 97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Access crosstab qry question (Access 97)

    Author
    Topic
    #405251

    Hello,

    I have a report that uses a crosstab to provide me with totals. The report currently prints everybody. My manager wants to be able to extract onlt certain departments by using a form with drop-down options to select the departments. I have done this in the past with other queries and have had NO problems. I know that things work a little differently with crosstabs but I think it should work.

    Please provide any information soon. I am working against the clock on this one!!!

    Thanks,
    Deborah

    Viewing 1 reply thread
    Author
    Replies
    • #830676

      It should work with crosstab queries too. If you run into problems, you may have to specify the form parameters explicitly:
      – In the design view of the query, select Query | Parameters…
      – Under Parameter, enter the form parameter, like this: [Forms]![frmSelect]![cboDropdown] – of course you must use the actual names for the form and combo box.
      – Under Data Type, select the data type of the bound column of the combo box.
      – Repeat for each form parameter.
      – Click OK.

      • #830688

        Hans,

        How to I specify what field to connect it to? I need 2 parameters to match company, cost center and type of training.

        Deborah

        • #830698

          Add the fields you want to filter on to the query design grid. In the Total row, select Where. Enter the reference to a combo box on the form in the Criteria row, as follows (with the correct names substituted):

          [Forms]![frmSelect]![cboSomething]

          (It seems to me that company, cost center and type of training are 3 parameters, not 2)

        • #830699

          Add the fields you want to filter on to the query design grid. In the Total row, select Where. Enter the reference to a combo box on the form in the Criteria row, as follows (with the correct names substituted):

          [Forms]![frmSelect]![cboSomething]

          (It seems to me that company, cost center and type of training are 3 parameters, not 2)

      • #830689

        Hans,

        How to I specify what field to connect it to? I need 2 parameters to match company, cost center and type of training.

        Deborah

    • #830677

      It should work with crosstab queries too. If you run into problems, you may have to specify the form parameters explicitly:
      – In the design view of the query, select Query | Parameters…
      – Under Parameter, enter the form parameter, like this: [Forms]![frmSelect]![cboDropdown] – of course you must use the actual names for the form and combo box.
      – Under Data Type, select the data type of the bound column of the combo box.
      – Repeat for each form parameter.
      – Click OK.

    Viewing 1 reply thread
    Reply To: Access crosstab qry question (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: