Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Question Unanswered: transfer data from excel

    I'm trying to import an excel spreadsheet into my DB. I can do this using a macro, however I need to import only where "GR date" = today's date.

    The solution can be a macro or code, I don't mind.

    pls help
    thanks in advance
    Actionant

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try this:
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "yourTempTable", "c:\Temp\yourXLfile.xls", True

    then make a RecordSet of the imported table, query the field called [GR Date] if it equals Date() then append the contents of the imported table to your main data, otherwise drop the imported table.

  3. #3
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    Originally posted by hammbakka
    Try this:
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "yourTempTable", "c:\Temp\yourXLfile.xls", True

    then make a RecordSet of the imported table, query the field called [GR Date] if it equals Date() then append the contents of the imported table to your main data, otherwise drop the imported table.
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •