qry = "SELECT * FROM LA_Codes WHERE Code BETWEEN '" & code1 & "' AND '" & code2 & "'"
You were so cloooose with this one!!! just take out the ' from your line...
qry = "SELECT * FROM LA_Codes WHERE Code BETWEEN " & code1 & " AND " & code2
Read this if you want to know how to get a correct reply for your question:
^^Took that from dparsons signature and he Took that from planoie's profile