views:

556

answers:

2

Does anyone know how to import .dbf file into MS ACcess 2007?

A: 

Do you want to do this programmatically?

MS-Access has option to import the tables OR you could create a Linked Table.

EDIT: Open the MS-Access MDB, goto tables. Right click -> Import -> Choose the appropriate database type (could be dbf in your case).

shahkalpesh
how do i import the tables form the MS ACCESS option? Please explain more... thanks
In A2007, it's on the ribbon under EXTERNAL DATA. Click the MORE dropdown and DBF is one of the choices.
David-W-Fenton
A: 

Well a VBA approach to pragmatically pull this information is to create a connection object connecting to the directory of the tables you want to pull from.

After that open a recordset to query what you need from the tables against that connection. A big benefit of directly connecting and scanning is that your not bulking up tables in your database to push you closer to your next repair/compact.

In order to get this connection however I needed some kind of ODBC connector, something the network admins came and installed behind my back when I switched to a new work PC and it suddenly broke upon connection. If this is something you would be using on other users PCs who won't have access to this (if this is a query you will be performing on a normal basis) it may not function properly for others...

Mohgeroth
Er, the VBA approach would be to use TransferDatabase to import each DBF file in turn.
David-W-Fenton