Dim lFrom as long, lTo as Long, l as Long
' check if values are entered
' code goes here

' read out entered values
lFrom = Clng(Val(Text1.Text))
lTo = Clng(Val(Text2.Text))
' validate if From < To
' code goes here

' loop from lFrom to lTo
For l = lFrom to lTo
' do something with l
' so that I can add all the
' numbers to the database
Next

My database is called carpet database and the table I wish to store the details in is called invoice numbers and the field is called invoice number...
If the user types in 100 and 300 as the two values I need to add these and all the numbers in between to my database for validation in other forms...

Can anybody help cos this is really streesing me out!!!

Cheers

Rhys