Marchese Il Chihuahua
Marchese Il Chihuahua

Reputation: 1129

Syntax for opening a report

I am getting a Runtime 2465 error message trying to open a report using the following routine:

DoCmd.OpenReport "rptSprechi", acViewPreview, , [qry_rptsprechi].[WasteType] = "UE", acIcon

Upvotes: 2

Views: 54

Answers (1)

HansUp
HansUp

Reputation: 97101

The fourth argument (WhereCondition) is supposed to be a string value. Yours looks wrong to me.

Try it this way ...

DoCmd.OpenReport "rptSprechi", acViewPreview, , "[WasteType] = 'UE'", acIcon

Upvotes: 2

Related Questions