Opening a Report (including a where statement with a crosstab query)

Timko

New member
Local time
Today, 17:55
Joined
Jun 17, 2004
Messages
8
Can anyone help me?

Im using the DoCmd.OpenReport comand with a where statement that changes depending on options chosen by the user. This works fine with normal select queries, but when I the report has a Crosstab query I get the following error message:

Run-time error '3070':

The Microsoft Jet database engine does not recognize <name> as a valid field name or expression. (Error 3070)

I know the field is correct as it works when the report has a plain select query attached.

This is baffling me, hope someone can help.

Timko :confused:
 
Rich,

I have tried this, but then it asks me to enter the parameter value for each of the parameters when I open the report. What am I doing wrong?

Timko
 
Use a form to enter the parameters and keep it open while the Report is opening
 
Still Confused

Rich,

Im sorry, but I am still confused by this. I have been through all the microsoft help and followed what it suggests, but it doesnt work.

What im doing is I have a combo box containing a list of reports that the user can choose. Some crosstab, some not. So the user chooses this crosstab report and selects the ok button on the form. This returns a numerical value that represents that report (in this case 7). Then another form is opened which asks for 2 more parameters. the user chooses these from 2 more combo boxes and again selects ok. So now I have all three of my parameters in variables; Report Type, Date and Country. With the select queries I just add these variables to an SQL query and include this query in the OpenReport comand.

I have tried leaving the second form open with all 3 parameters on it, then opening the form, but it just brings up the same error

"The Microsoft Jet database engine does not recognize <name> as a valid field name or expression"

Tim
 

Users who are viewing this thread

Back
Top Bottom