scasystems
Programmer
Got a table with primary key ranging from 1 to 3000
Need to find unused numbers between 1 to 3000.
How?
Need to find unused numbers between 1 to 3000.
How?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub FillAllNumbers()
Dim strSQL as String
Dim lngNumber as Long
For lngNumber = 1 to 3000
strSQL = "INSERT INTO tblAllNumbers (theNumber) Values (" & lngNumber & ");"
currentdb.execute strSQL
next lngNumber
End Sub
SELECT tblAllNumbers.theNumber, tblYourTable.PK
FROM tblAllNumbers LEFT JOIN tblYourTable ON tblAllNumbers.theNumber = tblYourTable.PK
WHERE (((tblYourTable.PK) Is Null));