Access Reports

R

redmond54

I have a picture of each student that I want to place on the first page of
their report but I do not want it to appear on the succeeding pages. How can
this be arranged?
 
J

Jason Rice

Place the picture in the Report Header and it will only appear at the front
of a printed report.
 
R

redmond54

Thank you Jason for replying.

I didn't explain my problem correctly.

The report has 88 pages and includes all of the students in my class.

Page one has one student's personal data (ie. name,address, phone number,
etc.) and that student's picture. Underneath that section (which I called the
"Last Name" header) is a breakdown of the marks for that individual. This
information runs for three pages and at the top of each page is the student's
data - picture included.

On the fourth page a new student's personal data appears along with the
accompanying picture. Underneath are his/her marks and this pattern follows
for another three pages and so on.

I only want each student's personal data (name address, phone number,
picture) to appear on the first page of that student's mark's pages. I do not
want the student's personal data to appear on all the pages.

Have I made it more confusing?
 
J

Jason Rice

Sorry, I misunderstood your request earlier.

There might be a prettier way to do this, but you can try this:

Set up a global variable to hold the student's last name (use "Dim LName as
String" before the first procedure in the report module).

Then in the On Format event of the Last Name Header you can use the code
something like this:


Option Compare Database
Option Explicit

Dim StudentName As String

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
If [LName] <> StudentName Then
StudentName = [LName]
Me.StudentPicture.Visible = True
Else: Me.StudentPicture.Visible = False
End If
End Sub

Just change [LName] and StudentPicture to the names of your name field and
picture control. The first two lines should appear in your module
automatically and the third is the global variable declaration.

HTH
 
Top