page break

K

Kathy

I am trying to have records with the same date/time and
user id print on the same page, if the next record returned
from the query has either different I need it to print by
itself on a page. I tried to add to the 'on format' of the
detail section something like:
If "Me!Start_Time_Date" <> Start_Time_Date Then
Me![CondPgBreak].Visible = True
Else
"Me!Login_ID" <> Login_ID Then
Me![CondPgBreak].visible = True

If I put the page break in the page footer, prints as many
as it can hold on a page. If I put the page break in the
detail it prints only one record per page.

Please help!
Thank you.
 
F

Fons Ponsioen

Why not group the repoert by date/time and user ID.
and in the group footer set properties to new page after.
This should do it.
Hope it helps.
Fons
 
F

Fredg

Kathy,
I've removed the quotes from around some of your
statement and also changed the logic a bit.
See if this works for you.

Place the PageBreak in the Detail Section.
Place this code in the Detail Format event.

If Me!Start_Time_Date <> Start_Time_Date OR Me!Login_ID <> Login_ID Then
Me![CondPgBreak].Visible = True
Else
Me![CondPgBreak].Visible = False
End If

If this still doesn't work rearrange the logic a bit more. Try:

If Me!Start_Time_Date = Start_Time_Date AND Me!Login_ID = Login_ID Then
Me![CondPgBreak].Visible = False
Else
Me![CondPgBreak].Visible = False
End If
 
Top