Count to 3 and....

  • Thread starter Thread starter Gina Whipp
  • Start date Start date
G

Gina Whipp

Hey Guys,

Does anyone know how (and if it's possible) in a query to count to 3 then
once the count hits three to print only three records per page from that
point on. Explain: The form has 3 pages, on page on two records are
printed, on page two one record is printed and on page page three three
records are printed. So if I have 15 records.... Minus 2 for page one,
minus 1 for page three and keep printing page three until the balance of the
records are printed (but only in groups of three)

Thanks in advance....
Gina Whipp
 
Hey Guys,

Does anyone know how (and if it's possible) in a query to count to 3 then
once the count hits three to print only three records per page from that
point on. Explain: The form has 3 pages, on page on two records are
printed, on page two one record is printed and on page page three three
records are printed. So if I have 15 records.... Minus 2 for page one,
minus 1 for page three and keep printing page three until the balance of the
records are printed (but only in groups of three)

Thanks in advance....
Gina Whipp

If I read your message correctly, you want to Print a query view and
break the pages into various uneven sections.
Can't be done.

But if you create a report, using the query as it's record source,
then it can be done.

I think you wish to print 2 records on the 1st page, 1 record on the
2nd page and then 3 records on each page thereafter.

Create a report, and lay out the controls however you wish them to
appear.
Add an unbound control to the bottom of the detail section.
Set it's control source to
=1
Set it's running sum to
OverAll.
Name this control
"Counter".
You can make it not visible if you wish or use it as a record
numbering control.

Add a Page Break to the bottom of the detail section.

Code the Detail Format event:

If [Page] = 1 and [Counter] = 2 Then
[PageBreakName].Visible = True
ElseIf [Page] = 2 Then
[PageBreakName].Visible = True
Else
[PageBreakName].Visible = [Counter] Mod 3 = 0
End If
 
Hey Guys,

Does anyone know how (and if it's possible) in a query to count to 3 then
once the count hits three to print only three records per page from that
point on. Explain: The form has 3 pages, on page on two records are
printed, on page two one record is printed and on page page three three
records are printed. So if I have 15 records.... Minus 2 for page one,
minus 1 for page three and keep printing page three until the balance of the
records are printed (but only in groups of three)

Thanks in advance....
Gina Whipp

If I read your message correctly, you want to Print a query view and
break the pages into various uneven sections.
Can't be done.

But if you create a report, using the query as it's record source,
then it can be done.

I think you wish to print 2 records on the 1st page, 1 record on the
2nd page and then 3 records on each page thereafter.

Create a report, and lay out the controls however you wish them to
appear.
Add an unbound control to the bottom of the detail section.
Set it's control source to
=1
Set it's running sum to
OverAll.
Name this control
"Counter".
You can make it not visible if you wish or use it as a record
numbering control.

Add a Page Break to the bottom of the detail section.

Code the Detail Format event:

If [Page] = 1 and [Counter] = 2 Then
[PageBreakName].Visible = True
ElseIf [Page] = 2 Then
[PageBreakName].Visible = True
Else
[PageBreakName].Visible = [Counter] Mod 3 = 0
End If

This line, in my previous post:
Add an unbound control to the bottom of the detail section.
should just have read:

Add an unbound control to the detail section.

It's the PageBreak that goes at the bottom of the section.
 
Fred... even though I did not explain it correctly you understood EXACTLY
what I was trying do... Going to try that... thanks!


fredg said:
Hey Guys,

Does anyone know how (and if it's possible) in a query to count to 3
then
once the count hits three to print only three records per page from that
point on. Explain: The form has 3 pages, on page on two records are
printed, on page two one record is printed and on page page three three
records are printed. So if I have 15 records.... Minus 2 for page one,
minus 1 for page three and keep printing page three until the balance of
the
records are printed (but only in groups of three)

Thanks in advance....
Gina Whipp

If I read your message correctly, you want to Print a query view and
break the pages into various uneven sections.
Can't be done.

But if you create a report, using the query as it's record source,
then it can be done.

I think you wish to print 2 records on the 1st page, 1 record on the
2nd page and then 3 records on each page thereafter.

Create a report, and lay out the controls however you wish them to
appear.
Add an unbound control to the bottom of the detail section.
Set it's control source to
=1
Set it's running sum to
OverAll.
Name this control
"Counter".
You can make it not visible if you wish or use it as a record
numbering control.

Add a Page Break to the bottom of the detail section.

Code the Detail Format event:

If [Page] = 1 and [Counter] = 2 Then
[PageBreakName].Visible = True
ElseIf [Page] = 2 Then
[PageBreakName].Visible = True
Else
[PageBreakName].Visible = [Counter] Mod 3 = 0
End If

This line, in my previous post:
Add an unbound control to the bottom of the detail section.
should just have read:

Add an unbound control to the detail section.

It's the PageBreak that goes at the bottom of the section.
 
Works like a charm... took me a minute to UNDERSTAND but I got it... (A
great programmer on here once typed, you shouldn't use code you don't
understand).. a very big THANK YOU!


fredg said:
Hey Guys,

Does anyone know how (and if it's possible) in a query to count to 3
then
once the count hits three to print only three records per page from that
point on. Explain: The form has 3 pages, on page on two records are
printed, on page two one record is printed and on page page three three
records are printed. So if I have 15 records.... Minus 2 for page one,
minus 1 for page three and keep printing page three until the balance of
the
records are printed (but only in groups of three)

Thanks in advance....
Gina Whipp

If I read your message correctly, you want to Print a query view and
break the pages into various uneven sections.
Can't be done.

But if you create a report, using the query as it's record source,
then it can be done.

I think you wish to print 2 records on the 1st page, 1 record on the
2nd page and then 3 records on each page thereafter.

Create a report, and lay out the controls however you wish them to
appear.
Add an unbound control to the bottom of the detail section.
Set it's control source to
=1
Set it's running sum to
OverAll.
Name this control
"Counter".
You can make it not visible if you wish or use it as a record
numbering control.

Add a Page Break to the bottom of the detail section.

Code the Detail Format event:

If [Page] = 1 and [Counter] = 2 Then
[PageBreakName].Visible = True
ElseIf [Page] = 2 Then
[PageBreakName].Visible = True
Else
[PageBreakName].Visible = [Counter] Mod 3 = 0
End If

This line, in my previous post:
Add an unbound control to the bottom of the detail section.
should just have read:

Add an unbound control to the detail section.

It's the PageBreak that goes at the bottom of the section.
 
Back
Top