When do you want to do the check?
If you want to do the check after a user enters the number, then I would use a function to do the check at whatever point needed (ie. Close form, textbox_After_Update etc). Do a SELECT query in the function and ORDER BY slipNo, move the cursor to the last entered record and check the SlipNo value. If this value is not equal to the current slip number minus one, then raise the error. (All as follows:)
------------------------Start code example
Private Function Last_Slip_No As long
Last_Slip_No = 0
Dim dbsSlipper as Database
Dim rstSlips as Recordset
set dbsSlipper = CurrentDb
set rstSlips = dbsSlipper.Execute ("SELECT SlipNo FROM tblSlips ORDER BY SlipNo")
if rstSlips.RecordCount > 0 then
rstSlips.movelast
Last_Slip_No = rstSlips.fields![SlipNo]
end if
rstSlips.close
dbsSlipper.close
End Function
------------------------End code example
This function example should return a number to a calling function that should check for a returned value of 0 (zero), which would indicate an error.
This all for if you want the check performed at a data-entry level.
If you want a data entry check done, you could use the above code with minor changes to fill a text string with the slip numbers that have not been entered within a range.
Another consideration is (if this is a multi-user situation), if another user may be entering the missing number while the check is being run...
Hope it helps
TimFox
(another posting with more info might help if I have missed the point)