I'm trying to write an Access VBA module which imports data from several Excel files. I'm using the DoCmd.TransferSpreadsheet command like this:
DoCmd.TransferSpreadsheet _
acImport, _
acSpreadsheetTypeExcel5, _
"Table Name", _
Path & "Excel...
I've just tried that and unfortunately I still get the same error, but thanks for the suggestion anyway.
Funnily enough, I just spoke to a co-worker and when he runs the exact same query every morning, he doesn't get the error message and the data still turns out correct in the end. Access is...
I am trying to add criteria to a date column on my Access query so that it only returns records from between 45 days ago and today's date. In the Criteria box for the date column I have put Between Date()-45 And Date() but when I try to run the query, I get an error message saying "ODBC Call...
I am stuck on a make-table query which involves date criteria. When I try to run the query, I get an error message saying "ODBC call failed. [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting datetime from character string. (#241)."
In my query design view, there are 2...
Thanks for your help. In the end, I decided to use ALTER TABLE statements. Previously, the user of the database was having to manually change the data types of the columns (by going into Design view) every time they wanted to run the report. Once I had created the ALTER TABLE statements, I...
I need to automatically change the datatype of one of the columns in an Access table from Binary to Number using VBA. I tried using the code below to do this but get the runtime error 3219: Invalid Operation.
Is there any way I can do this?
Public Sub ChangeColumnType()
Dim db As...