Connecting Tech Pros Worldwide Help | Site Map

Open Report with Where Condition

  #1  
Old September 2nd, 2006, 06:45 PM
Mike
Guest
 
Posts: n/a
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


  #2  
Old September 2nd, 2006, 06:45 PM
Mike
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of OutputTo for a report with a Where condition Jim Devenish answers 2 October 10th, 2007 05:35 PM
Reuse Report and Query and OutputTo - Must be a Way! sara answers 5 August 21st, 2006 04:45 PM
A report with prompts, but without a query...Possible? Clarification Please. tom@nvwisp.com answers 1 February 10th, 2006 05:35 AM
Open Report filtering from a listbox diskoduro answers 1 November 12th, 2005 06:17 PM