> It's a bit difficult to do this without understanding your table structure. I
> would create a column in your report's record source query that returns a
[quoted text clipped - 15 lines]
> > maximum of 15 records on each page with subtotals after each batch of 15
> > records. How can I achieve this easily??
Your issue is probably caused by spaces in your field and table names. If
[EMPLOYEE REF] is numeric, try:
SELECT Val(DCount("*","Payroll Employees Pay Slips","[EMPLOYEE REF]<" &
[EMPLOYEE REF]))\15 AS GroupNum, [Payroll Employees Pay Slips].*
FROM [Payroll Employees Pay Slips]
ORDER BY [Payroll Employees Pay Slips].[EMPLOYEE REF];
If it is text, try:
SELECT Val(DCount("*","Payroll Employees Pay Slips","[EMPLOYEE REF]<""" &
[EMPLOYEE REF] & """"))\15 AS GroupNum, [Payroll Employees Pay Slips].*
FROM [Payroll Employees Pay Slips]
ORDER BY [Payroll Employees Pay Slips].[EMPLOYEE REF];

Signature
Duane Hookom
Microsoft Access MVP
> Thanks for the information, I have created a query to test the sql and the
> query is as follows:
[quoted text clipped - 29 lines]
> > > maximum of 15 records on each page with subtotals after each batch of 15
> > > records. How can I achieve this easily??
KHogwood-Thompson - 07 Mar 2008 08:25 GMT
Thanks for that Duane, not sure if that was the problem or not, as I get the
following error when I run that SQL:
"The expression that you entered as a query parameter produced this error:
'The object doesn't contain the Automation object 'CO?' "
The underlying query "Payroll Employees Pay Slips" contains two Integer
parameters, [CO?] and [WEEK NO?], basically selecting the company number and
the payroll week.

Signature
K Hogwood-Thompson
> Your issue is probably caused by spaces in your field and table names. If
> [EMPLOYEE REF] is numeric, try:
[quoted text clipped - 42 lines]
> > > > maximum of 15 records on each page with subtotals after each batch of 15
> > > > records. How can I achieve this easily??
Duane Hookom - 07 Mar 2008 16:01 GMT
IMHO, don't ever use parameter prompts in queries. Take a look at
http://www.tek-tips.com/faqs.cfm?fid=6763 and replace your criteria with
references to controls on a form.

Signature
Duane Hookom
Microsoft Access MVP
> Thanks for that Duane, not sure if that was the problem or not, as I get the
> following error when I run that SQL:
[quoted text clipped - 52 lines]
> > > > > maximum of 15 records on each page with subtotals after each batch of 15
> > > > > records. How can I achieve this easily??