A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Print one page of a report



 
 
Thread Tools Display Modes
  #1  
Old June 4th, 2004, 03:27 PM
Dan
external usenet poster
 
Posts: n/a
Default Print one page of a report

I have a report that has one page for each record and we
print the report all at once through a print button on a
form. However, I also need to also be able to print the
individual page that responds to the current record. Is
there any way to do this.
  #2  
Old June 4th, 2004, 04:02 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default Print one page of a report

Use the WhereCondition of the OpenReport action to limit the report to just
the current record.

This example assumes the form is bound to a table that has an AutoNumber
named ID:

Private Sub cmdPrintThisRecord_Click()
If Me.Dirty Then 'Save first.
Me.Dirty = False
End If
If Me.NewRecord Then
Msgbox "Select a record to print."
Else
DoCmd.OpenReport "MyReport", acViewPreview, , "ID = " & Me.[ID]
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dan" wrote in message
...
I have a report that has one page for each record and we
print the report all at once through a print button on a
form. However, I also need to also be able to print the
individual page that responds to the current record. Is
there any way to do this.



  #3  
Old June 4th, 2004, 04:07 PM
Katrina
external usenet poster
 
Posts: n/a
Default Print one page of a report

If you only want to print for the current record, put a where clause(without
the word where) on your openreport action.

Docmd.openreport "rptName", acviewpreview, ,"CustomerID = " & me.customerID


HTH
Kat

Dan wrote in message
...
I have a report that has one page for each record and we
print the report all at once through a print button on a
form. However, I also need to also be able to print the
individual page that responds to the current record. Is
there any way to do this.



  #4  
Old June 4th, 2004, 04:10 PM
hcj
external usenet poster
 
Posts: n/a
Default Print one page of a report

Hi Dan,
Make a Command Button that uses Record Operations/Print
Record. If you use Form Operations, it will print all
records - not what you want.

Hope this helps.

-----Original Message-----
I have a report that has one page for each record and we
print the report all at once through a print button on a
form. However, I also need to also be able to print the
individual page that responds to the current record. Is
there any way to do this.
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.