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 / March 2008

Tip: Looking for answers? Try searching our database.

importing access tables into an access db

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amanda Kelly - 17 Mar 2008 18:11 GMT
I have the following code for a click event on a command button:

Private Sub Command86_Click()
On Error GoTo err_command10_click

Dim strfile As String

strfile = InputBox("Please enter the full path and file name including the
extension of the Access database that contains the data to be imported.")

DoCmd.TransferDatabase acImport, "Microsoft Access", strfile

exit_command10_click:
Exit Sub

err_command10_click:
MsgBox Err.description
Resume exit_command10_click

End Sub

---------------------------------------------

i get an error message that says "" The Microsoft Jet database engine could
not find the object ".  Make sure that the object exists and that you spell
its name and path name correctly."

I am copying and pasting the properties of the file (path and name) directly
out of the directory into the input box.  So I cannot be mispelling it.

Any help would be graciously appreciated...

Thanks,

Signature

Amanda Kelly

Douglas J. Steele - 17 Mar 2008 18:52 GMT
The TransferDatabase method requires a few more parameters: you must specify
what type of object you're importing (acTable in your case), the name of the
object in the source database and the name you want to use for the object in
the destination database. You also have a choice of specifying if you want
only the table structure imported without its data.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I have the following code for a click event on a command button:
>
[quoted text clipped - 32 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.