J
Jan Il
Hi - Access 2002, WinME
Two years ago Stve Schapel helped me create the function below to
automatically update a table in my SDG&E electrical meter database for data
downloaded from a website to my hard drive.
I just reinstalled 2002 back in October 2003, and then the website went
down. It is back on line now, and for some reason I am getting a debug error
when I try to run this function. The code below in behind a button on the
control form. Nothing has changed since the last time I downloaded the last
updates, except for the reinstall of v2002. The part of the code below where
the debugger throws the error is this line (which is all on one line in the
database.
.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Download",
"C:\Excel\Download\Download.xls", True
My question is, at the time he helped with this code I had Access 2000. At
that time he said that the number 19 in this line of code,
acSpreadsheetTypeExcel9, should represent Excel 2000. In that case, should
that number be changed to the number that represents
Excel 2002? I am not sure if this is the cause of the problem, and I am only
taking a guess at this. The download process no longer works as it did
before, and in view of the fact that the code had been working perfectly up
until today, and the only change made to any part of the process being the
change in program versions, I just thought I would check this out first to
eliminate the most obvious before going into extensive troubleshooting.
I would truly appreciate it if someone would review the code and see if
indeed the version number should be changed, and advise me as to what it
should be changed to.
Very best regards,
Jan
*******************Start of Code*******************************
Private Sub Command79_Click()
With DoCmd
.SetWarnings False
.OpenQuery "qryDeleteDownload"
.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Download",
"C:\Excel\Download\Download.xls", True
.OpenQuery "append to monthly billing download"
.SetWarnings True
End With
MsgBox "Download Complete" 'add other arguments as desired
sExit:
Exit Sub
sError:
MsgBox "Error in Download Process"
Resume sExit
End Sub
**********************End of Code*****************
Two years ago Stve Schapel helped me create the function below to
automatically update a table in my SDG&E electrical meter database for data
downloaded from a website to my hard drive.
I just reinstalled 2002 back in October 2003, and then the website went
down. It is back on line now, and for some reason I am getting a debug error
when I try to run this function. The code below in behind a button on the
control form. Nothing has changed since the last time I downloaded the last
updates, except for the reinstall of v2002. The part of the code below where
the debugger throws the error is this line (which is all on one line in the
database.
.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Download",
"C:\Excel\Download\Download.xls", True
My question is, at the time he helped with this code I had Access 2000. At
that time he said that the number 19 in this line of code,
acSpreadsheetTypeExcel9, should represent Excel 2000. In that case, should
that number be changed to the number that represents
Excel 2002? I am not sure if this is the cause of the problem, and I am only
taking a guess at this. The download process no longer works as it did
before, and in view of the fact that the code had been working perfectly up
until today, and the only change made to any part of the process being the
change in program versions, I just thought I would check this out first to
eliminate the most obvious before going into extensive troubleshooting.
I would truly appreciate it if someone would review the code and see if
indeed the version number should be changed, and advise me as to what it
should be changed to.
Very best regards,
Jan
*******************Start of Code*******************************
Private Sub Command79_Click()
With DoCmd
.SetWarnings False
.OpenQuery "qryDeleteDownload"
.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Download",
"C:\Excel\Download\Download.xls", True
.OpenQuery "append to monthly billing download"
.SetWarnings True
End With
MsgBox "Download Complete" 'add other arguments as desired
sExit:
Exit Sub
sError:
MsgBox "Error in Download Process"
Resume sExit
End Sub
**********************End of Code*****************