Re: Creating a report for 1 record from a query



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


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Rpainter" <Rpainter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:26DB7257-BB5F-41C7-8C33-978859991193@xxxxxxxxxxxxxxxx
Forgive my ignorance, but is the "ID=3" a variable?
Thanks

"Damian S" wrote:

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.

"Rpainter" wrote:

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.


.



Relevant Pages

  • Re: Email single record on a report
    ... I have a form and I am wanting to be able to email the current record ... You can exploit a behavior in Access wherein executing a report that is already ... opened in preview mode will always produce the same filtering as the one being ... Rick Brandt, Microsoft Access MVP ...
    (microsoft.public.access.reports)
  • Re: Email single record on a report
    ... I have a form and I am wanting to be able to email the current record ... SendObject doesn't have a WHERE argument like OpenReport does. ... You can exploit a behavior in Access wherein executing a report that is already ... opened in preview mode will always produce the same filtering as the one being ...
    (microsoft.public.access.reports)
  • Re: Genes make Jews smarter: researcher Charles Murray says natural selection made Jews smarter
    ... Anyway any smarter jewish person wanting to pick up a quick buck check ... Where can this report be read, ... Patrick Keenan is really Chris "Slimey" Sheldon of Wigan, ... And if you could recall, you'd be wrong with them too. ...
    (soc.culture.israel)
  • Re: A little medic story about me
    ... Interesting report about your condition Splodge. ... Can't say I blame you not ... wanting another op after all the ones you have had. ...
    (uk.people.silversurfers)
  • Re: Inno
    ... From a previous post I am wanting to set up Inno, from the link below I have ... followed the instructions but getting the following report, ...
    (microsoft.public.vb.general.discussion)