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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alert user when number is skipped

Status
Not open for further replies.

itsuit

IS-IT--Management
Apr 23, 2002
53
US
I use an Access 2000 report to create checks based on information in an external ODBC database. I'd like to have the user alerted if a check number in the report is skipped (the check number comes from a field in the external view and is stored as a number).

Any help is appreciated.
 
Create A numbers table
1 field digitid
with numbers from 1 to .......

create a query AllChecknums
Code:
Select digitid
from numbers
inner join (Select min(Checkno)mincheckno,max (checkno)     maxcheckno
from ExternalTable)
on digitid between mincheckno and maxcheckno
your recordsource on the report should be
Code:
Select digitid from AllChecknums
left join ExternalTable
on ExternalTable.checknum = AllChecknums.digitid

on the report add text box with this control source
Code:
=nz(ExternalTable.checknum,AllChecknums.digitid)+ " is missing in ExternalTable"


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top