Yes, and apparently OP wants to accomplish with the given beginning and ending values (starting number 344125 and ending register number 344250) and automate creation of appropriate number of records to fit the range.
Just had 'deja vu' sensation - feel like I've helped someone with very similar requirement. Oh, remember now and similar enough to use same solution. Writing records to temp table probably best approach. Something like:
Code:
Sub BuildRoster()
Dim n As Integer, intRecs As Integer, y As Integer, z As Integer
Dim dblStart As Double, dblEnd As Double
dblStart = Me.tbxStart
dblEnd = Me.tbxEnd
CurrentDb.Execute "DELETE FROM Roster"
intRecs = Int(dblEnd - dblStart) / 20 + IIf((dblEnd - dblStart) Mod 20 > 1, 1, 0)
y = (dblEnd - dblStart) Mod 20 + 1
z = 20
For n = 1 To intRecs
If n = intRecs And y <> 0 Then z = y
CurrentDb.Execute "INSERT INTO Roster(StartNo, EndNo) VALUES(" & dblStart & ",'" & dblStart + z - 1 & "," & z & " Nos')"
dblStart = dblStart + z
Next
End Sub