Hi Rpainter,
You could either have your query so that it uses the ID in the criteria
field, or open your report like this:
docmd.OpenReport "REPORTNAME", acViewPreview,,"ID = 3"
Hope this helps.
Damian.
> I have a report that prints all records from a particular query, but I'm
> wanting to print just 1 record. Sorta like selecting a company that has
> multiple invoices, but only wanting to print 1. Can somebody help me?
>
> Thanks.
Rpainter - 31 Jan 2007 13:45 GMT
Forgive my ignorance, but is the "ID=3" a variable?
Thanks
> Hi Rpainter,
>
[quoted text clipped - 12 lines]
> >
> > Thanks.
Douglas J. Steele - 31 Jan 2007 15:02 GMT
It's a WHERE clause (without the word WHERE) that limits the report to only
those records that match the condition.
It could be a variable:
Dim strFilter As String
strFilter = "ID = 3"
DoCmd.OpenReport "REPORTNAME", acViewPreview,,strFilter

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Forgive my ignorance, but is the "ID=3" a variable?
> Thanks
[quoted text clipped - 17 lines]
>> >
>> > Thanks.