I think the easiest solution is to tweak the recordset for your report.
How about creating a master set of record sequences and then joining
them to your actual report? That way you have real data for a query
based comparison.
e.g.
Master table
Record Seq
1
2
3
Now your real record set
real records
Record Seq Title
1 Record 1
3 Record 2
Now set the Recordset for your report to this query:
SELECT [master table].[Record Seq], [real records].Title
FROM [master table] LEFT JOIN [real records] ON [master table].[Record
Seq] = [real records].[Record Seq];
Ahh, but now you want to display "record skipped" if there is no entry
for that record. So use an if statement to add that text and use this
query as your report recordset:
SELECT [master table].[Record Seq], IIf(IsNull([Title])=True,"record
skipped",[title]) AS [Report Title]
FROM [master table] LEFT JOIN [real records] ON [master table].[Record
Seq] = [real records].[Record Seq];
And there you have it...
Bruce wrote:
Surely someone has done this before, and I am guessing there is a
simple solution that is eluding me. I have a simple report based on a
recordset. For each record there is a field (RecNum) that is basically
a sequential number from 1 to n. Occasionally there are skips between
numbers. I would like to print 'record skipped' for each record
missing from the sequence. For example, if there were no records
numbered 5 and 6 in a sequence of records numbered 1 to 7 I'd like to
output something like the following:
1...
2...
3...
4...
record skipped
record skipped
7...
Short of creating dummy records, how might I achieve this? Thanks.
Bruce