Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create new field with continuos number field

Status
Not open for further replies.

ProgramError

Programmer
Mar 2, 2005
1,027
GB
Hi All

having trouble making a report show only three records per page (using it to show three pairs of student names on a DVD so cannot alter report size or margins etc) so I thought I could do it by creating a colomn with a value of 1,2 or 3 then starting again at 1 ,2 then 3 again.

What I need to know is how can this be done in SQL?? totally confused tring to think of a method. I can do it on a form but cant on a report.


Ian Mayor (UK)
Program Error
Always make your words sweet and nice. Because you never know when you may have to eat them.
 
On the report you can just add a counting field by putting =1 in the Control Source and setting the Running Sum property to Yes. Then in the Format event for the section the info is in, usually Detail, you can put code like this

If [FieldName] Mod 3 = 0 Then
"Force your page break here"
Else
End If

Paul

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top