Connecting Tech Pros Worldwide Forums | Help | Site Map

Open Report with Where Condition

Mike
Guest
 
Posts: n/a
#1: Sep 2 '06
I have a button on a form that has the following code under the button:

===Begin Code <===
Dim stDocName As String
stDocName = "rptAppraisalForm"
DoCmd.OpenReport stDocName, acPreview, , [id] = Me.id
===End Code <===

The problem is that when I click the button it opens all the records in the
data base instead of just the one with the correct id number.

How do I correct this?

Thanks
Mike
m b charney at sbc global dot net



Mike
Guest
 
Posts: n/a
#2: Sep 2 '06

re: Open Report with Where Condition


Never mind I am stupid. Forgot the formatting.

Sorry for the clutter.

Mike

"Mike" <me@you.comwrote in message
news:kzjKg.14169$1f6.4439@newssvr27.news.prodigy.n et...
Quote:
>I have a button on a form that has the following code under the button:
>
===Begin Code <===
Dim stDocName As String
stDocName = "rptAppraisalForm"
DoCmd.OpenReport stDocName, acPreview, , [id] = Me.id
===End Code <===
>
The problem is that when I click the button it opens all the records in
the data base instead of just the one with the correct id number.
>
How do I correct this?
>
Thanks
Mike
m b charney at sbc global dot net
>

Closed Thread