Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / January 2007

Tip: Looking for answers? Try searching our database.

Creating a report for 1 record from a query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rpainter - 30 Jan 2007 20:11 GMT
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.
Damian S - 30 Jan 2007 23:17 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.