I'm having problems with importing an excel file into my database. I had a similar problem a few months ago but some how i
kind of got around it at the time. Unfortunately, its come back to haunt me again!
Basically , ive created a database for a team of novice users, who will need to import an excel file every week into the
database.Ive tried to keep it as simple as possible. Therefore, Ive created a command button which should import this Excel
file (which is provided every week by another department and contains over 12,000 records!) into the database. Below is the
code i am using to import this file:
Dim importExtractFileLocation As String
importExtractFileLocation = "y:ExtractExtract2.xls"
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel7, "Extracts", importExtractFileLocation, True
MsgBox "Importing Extracts File complete.", vbOKOnly + vbInformation, "Import"
I do not get any errors when i run this code. In the status bar, it shows the progress of the file being imported, but
unfortunately, part way through it just stops all of a sudden without doing anything. It doesnt import a single record and
doesnt show any error message or anything.
I tried changing the formatting of the file, tried moving location of the file etc, but nothing is making a difference at the
moment. Has anyone else come across this problem or know why this may be occur? Is there anyway of getting around this
without converting it to a text file etc.
I need to get this sorted out ASAP, as im already running late on the project. Therefore, i would really really appreciate
it, if anyone can please help me out with this.