Filtering CrossTab Data

JACKSON

Registered User.
Local time
Today, 01:49
Joined
Dec 22, 2003
Messages
79
Hi

I have set up a query and a Crosstab Query based on that Query. This works fine, but I am trying to filter the data in the crosstab query to only include the account info for the account the user is viewing.

My crosstab looks something like this :

Account # Result 1 Result 2 Result 3 Result 4

I can static a criteria in the base query (Criteria Account = "1") and it works, but I need the criteria in the query to change based on the record the user is viewing on a specific form. I tried to reference the form ; Forms![formname].[account] but the crosstab query will not run that way. Is there a way through code to change the criteria in a query for a specific field ?? Or do I need to create a recordset and use SQL statements ?

Any thoughts ??

Thanks
 
For the crosstab query to work, you need to declare the data type of the parameter.


Open the query that contains the parameter in query Design View.
Change the parameter to [Forms]![formname]![account]
Select menu Query, Parameters...
Type [Forms]![formname]![account] in the parameter column.
Select the correct data type in the next column.
Click OK.
.
 

Users who are viewing this thread

Back
Top Bottom