"erick-flores" <ch**********@hotmail.comwrote in
news:11*********************@s13g2000cwa.googlegro ups.com:
Hello, I want to make a report for a single compressor.
Instead of showing a report for all the compressors. I would
like to place a button in the compressor form, so whenever I
want to display a report from that particular compressor I
click the button and the report will show ONLY that
compressor. Each compressor has it own primary key. So i guess
I need to match that pk with my report. Can somebody give me
some ideas ? I am pretty familiar creating reports but I just
dont know how to create a report for a particular data in a
particular field
Thankssss
you can open any report filtered to any expression using the
where parameter of the .openreport method of Docmd
in the OnClick event of the button that opens the form,
Dim stDocName as string
Dim stwhereclause as string
stdocname = "myReport"
stwhereclause = "primaryKey = " & me.txtPrimaryKey
docmd.openreport stdocname,,,stwhereclause
The Wizard does the same thing.
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com