Search results

  1. L

    VBA module to import data from a specific Excel workbook tab

    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...
  2. L

    Problem with setting criteria on datetime value

    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...
  3. L

    Problem with query containing date criteria

    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...
  4. L

    Using VBA to change the datatype of a column

    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...
Back
Top Bottom