Well, in that case (if the INSERT seems to work correctly), simply change the value of Box_ID right before you pass it to the database. In your example you padded FullMedlID with leading zeros, but then use Var1 (nice, descriptive variable name, BTW ;) ) for the SQL statement:
Code:
' Before we construct and pass the SQL statement, modify
' the value of Var1 so it is padded with zeros.
' Var1 comes from Request.QueryString("FullMedlID")
' Now padd it with zeros
Var1 = Right("00000" & Var1, 5)
' And then insert Var1 together with the other variables in the database.
'SQL Statement
SQL = "INSERT INTO Box_ID (BoxID, FirstName, LastName, Adress, PostNr, PostAdress, EmailAdress, PassWord, TelNr, Fnr, MFID)"
SQL = SQL & "VALUES ('" & Var1 & "'"
SQL = SQL & " ,'" & Var2 & "'"
SQL = SQL & " ,'" & Var3 & "'"
SQL = SQL & " ,'" & Var4 & "'"
SQL = SQL & " ,'" & Var5 & "'"
SQL = SQL & " ,'" & Var6 & "'"
SQL = SQL & " ,'" & Var7 & "'"
SQL = SQL & " ,'" & Var8 & "'"
SQL = SQL & " ,'" & Var9 & "'"
SQL = SQL & " ,'" & Var10 & "'"
SQL = SQL & " ,'" & Var11 & "')"
' Utför sql statement
Set RS = Cn.Execute(SQL)
If all works out as expected, the database column BoxID should now contain 00035.
HtH
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.