I need to create a module (for the first time) that adds a specific amount of serial numbers to the database. I will have the form ask for a first serial number and a last serial number
What I want is for the loop to create the amount of records I have asked for Ex. First record = 255 Last record = 300 I would want the module to create 45 records in the database. With the Code name attached.
I have started with the following code:
Public Sub addserialnumbers()
On Error GoTo ErrorHandler
Dim Codename As Double
Dim SerialNumber As Long
Dim Firstrecord As Long
Dim LastRecord As Long
'Add user defined amount of serial numbers
For SerialNumber = Firstrecord To SerialNumber = LastRecord
Add.new SerialNumber
Add new Code Name
End if LastRecord = LastRecord
Next SerialNumber
End Sub
What I want is for the loop to create the amount of records I have asked for Ex. First record = 255 Last record = 300 I would want the module to create 45 records in the database. With the Code name attached.
I have started with the following code:
Public Sub addserialnumbers()
On Error GoTo ErrorHandler
Dim Codename As Double
Dim SerialNumber As Long
Dim Firstrecord As Long
Dim LastRecord As Long
'Add user defined amount of serial numbers
For SerialNumber = Firstrecord To SerialNumber = LastRecord
Add.new SerialNumber
Add new Code Name
End if LastRecord = LastRecord
Next SerialNumber
End Sub