Re: Creating a report for 1 record from a query
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 10:02:34 -0500
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.
.
- Prev by Date: RE: Error message 'form is locked'
- Next by Date: Re: Tables/Form
- Previous by thread: RE: Error message 'form is locked'
- Next by thread: Hide subreport/move another subreport in it's place
- Index(es):
Relevant Pages
|