Copy this code exactly as you see it.
Click TOOLS / REFERENCES and make sure you have the "Microsoft DAO 3.6 Object Library" checked ON
-------------------------------------------------------
Private Sub Command0_Click()
Dim IntStartNum As Integer
Dim IntTotalAssigned As Integer
Dim StrLeadTech As String
Dim StrBranch As String
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("Table1"
StrLeadTech = InputBox("Enter in Lead Tech"

StrBranch = InputBox("Input Assigned Branch"

IntStartNum = InputBox("Input Starting Number"

IntTotalAssigned = InputBox("Input Last Number Assigned"
With rst
While IntStartNum <= IntTotalAssigned
Do
.AddNew
!StartNum = IntStartNum
!Branch = StrBranch
!Lead = StrLeadTech
.Update
IntStartNum = IntStartNum + 1
Loop
Wend
.Close
End With
----------------------------------------------
I just ran this and it worked FINE...
BRANCH LEAD startnum
branch 1 leaf tech 1
branch 1 leaf tech 2
branch 1 leaf tech 3
branch 1 leaf tech 4
branch 1 leaf tech 5
branch 1 leaf tech 6
branch 1 leaf tech 7
branch 1 leaf tech 8
branch 1 leaf tech 9
branch 1 leaf tech 10
The only thing you need to change is the name of your TABLE in the OpenRecordset method.
Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at