Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / June 2005

Tip: Looking for answers? Try searching our database.

how do i connect to a DBF database from access visual basic code?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
abaldo1977 - 29 Jun 2005 22:57 GMT
I'm trying to connect to a dbf file from a visual basic function (in a module
in access) to get some data and copy it in an access table...

I can't use ODBC, i must get the dbf file from a common dialog, connect to
it, get the data and close it.

Thanks...
Klatuu - 29 Jun 2005 23:16 GMT
I am assumming that you mean either a Dbase or Foxpro table.  If this is
correct:
Use the TransferDatabase method.  The database type is "Dbase III"
(probably). Use acLink as the transer type.  Now the dbf will look like an
Access table to DAO.
You can then create an Action query that will move the data however you
want, then use the docmd.DeleteObject to remove the link.

> I'm trying to connect to a dbf file from a visual basic function (in a module
> in access) to get some data and copy it in an access table...
[quoted text clipped - 3 lines]
>
> Thanks...
abaldo1977 - 30 Jun 2005 17:32 GMT
Thank you very much.... It's working perfectly now.

Here's the code if anybody has the same problem anytime:

DoCmd.TransferDatabase acImport, "dbase III", "C:\", , "mayor.dbf",
"tempImportacion"

(imports the DbaseIII file c:\mayor.dbf in the Access table tempImportacion)

> I am assumming that you mean either a Dbase or Foxpro table.  If this is
> correct:
[quoted text clipped - 11 lines]
> >
> > Thanks...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.