First, why are you opening the file? There is not need to do it, just let sql doing its job. The lines of code
Code:
Dim sPath As String
Open "MyDatabase.mdb" For Input As #1
are completely useless.
Second, I suggest you to write the full path of the file, if you just use "MyDatabase.mdb" the program will work only when the working folder and the file path are the same.
Please, use the [code] tag to post you code...
"There are two ways to write error-free programs. Only the third one works."
Unknown