Imports data from Excel or Foxpro

H

hin87_at_yahoo.com

Hi

How can I create VBA codes to imports data from Excel spreadsheetfor
FoxPro dbf files?

I am able to export the data from Table to Excel using:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
dbtable, path

When I trying using this, nothing happen:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, dbtable,
path, True

How can I import data using VBA code? I want to control which columns
goes with which table columns.

Thanks,
H
 
P

Pieter Wijnen

import it into a local (temporary) table
use a query to copy the data to the correct table
(drop the temporary table)

HTH
Pieter
 
Top