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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Print individual pages in a report



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2008, 09:41 PM posted to microsoft.public.access.gettingstarted
kjstec
external usenet poster
 
Posts: 6
Default Print individual pages in a report

Hi - I created a custom report to look like a current form we use in our
department. When I run the report, it shows all 1500 records. Is there
anyway to print individual pages in a report? I am new to Access. We input
many Serious Adverse Events for the Oncology Research department - if I need
to get a specific SAE to the IRB - can I fill in the form a single page
report so that I only have to print the one page of the report?

Thanks,
Kathy
  #2  
Old April 10th, 2008, 10:37 PM posted to microsoft.public.access.gettingstarted
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Print individual pages in a report

"kjstec" wrote in message
...
Hi - I created a custom report to look like a current form we use in our
department. When I run the report, it shows all 1500 records. Is there
anyway to print individual pages in a report? I am new to Access. We
input
many Serious Adverse Events for the Oncology Research department - if I
need
to get a specific SAE to the IRB - can I fill in the form a single page
report so that I only have to print the one page of the report?



If you have a button on the form to "Print This Event" (for example), you
can specify the ID (or primary key) of that event as a criterion in the code
behind the button that prints the report. For example:

Private Sub cmdPrintThis_Click()

If IsNull(Me.EventID) Then\
MsgBox "Can't print -- No Current Event"
Exit Sub
End If

' Make sure the current record has been saved.
If Me.Dirty Then Me.Dirty = False

' Print the report. Could preview it instead, if you wanted to.
DoCmd.OpenReport "rptSAEReport", _
WhereCondition:="EventID = " & Me.EventID

End Sub

That code assumes that "EventID" is the name of the primary key field for
the table that is behind both the form and the report.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #3  
Old April 13th, 2008, 10:40 PM posted to microsoft.public.access.gettingstarted
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default Print individual pages in a report

Kathy:

If I might add one small point to Dirk's reply. It assumes that EventID is
a number data type, e.g. an autonumber. If it, or whatever your equivalent
key field is called, should happen to be text data type, then you'd need to
wrap its value in quotes characters like so:

WhereCondition:="EventID = """ & Me.EventID & """"

A pair of contiguous quotes characters within a string expression is
interpreted as a literal quotes character.

Ken Sheridan
Stafford, England

"kjstec" wrote:

Hi - I created a custom report to look like a current form we use in our
department. When I run the report, it shows all 1500 records. Is there
anyway to print individual pages in a report? I am new to Access. We input
many Serious Adverse Events for the Oncology Research department - if I need
to get a specific SAE to the IRB - can I fill in the form a single page
report so that I only have to print the one page of the report?

Thanks,
Kathy


 




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 11:44 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.