Reports & Strd Procs.

E

Eric

Hi,

Is it just me, or is running a report with a record source
set to a stored procedure irritating.

Everytime I do something to fix a problem, a new one
arises.

Here's my lastest problem. My report is broken down into
different groups. I use the DoCmd.OpenReport function to
open my reports. I also include the WhereCondition
argument, to narrow my data down. But for some reason, no
matter what I put in the WhereCondition, it's completely
ingored.

Ex. Let's say I have a field (Field1) set as a group
header. I only want the records that have a value of 1 for
in Field1. So I would do this:
DoCmd.OpenReport "myReport", acPreview,, "Field1=1"
The condition will not do anything. It will still show all
records, regardless of what value is in Field1.

(I am using an ADP)

Can someone HELP!!!

TIA,
Eric
 
W

Wayne Morgan

Usually it doesn't matter, but sometimes Access gets picky and insists on brackets. Try

DoCmd.OpenReport "myReport", acPreview,, "[Field1]=1"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top