Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing sql server table to MS Access Version: 2000

Status
Not open for further replies.

dhar2611

Programmer
Jan 4, 2006
23
AU
Hi Guys,

How is everythig going??? I am stuck over here and your help is very much needed.

I am using the code below to connect to the sql server and import the tables. Its working fine. But the problem is it pops up with a window and ask me "to select a database".
Is there anyway I can overcome this. Because I am running a job overnight and there is no one here.

Tell me if I can do it in a better way.

Function transferData()
DoCmd.TransferDatabase acImport, "ODBC Database", _
"ODBC;SERVER=SERVER NAME;UID=UsER NAME;PWD=PASSWORD;LANGUAG E=us_english;" _
& "DATABASE=DATABASE NAME", acTable, "SOURCE TABLE NAME", "DESTINATION TABLE NAME"
End Function

Your help will be much appreciated.

Thanks guys

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top