Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to print 1 record

Status
Not open for further replies.

webjunk

MIS
Dec 28, 1999
42
0
0
US
I have a form that displays records one by one. I put in a Print button but it prints all of the records to a Report at once. I want it to print one record at a time. Help

Thanks [sig][/sig]
 
This will get you going I think.

Dim stDocName As String
Dim strFilter As String
strFilter = "[KeyID]=" & Me.KeyID

stDocName = "Report1"
DoCmd.OpenReport stDocName, acPreview, , strFilter

Replace the KeyID part of this example with your linking field.
By using the acPreview you can view the results.

Let us know if this works!

John [sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
Or if you don't want to preview use

DoCmd.PrintOut acSelection [sig]<p>Keith C Taylor<br><a href=mailto:TekTips@kctaylor.co.uk>TekTips@kctaylor.co.uk</a><br><a href= Information Gardener</a><br>The C stands for Computer![/sig]
 
I'm new to using Access. How do you know and where can you find your &quot;linking field&quot;?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top