#1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Download

Hello,

I am using the following code in VBA Excel to try and
download an Access table. The access table is password
protected and this code is an example of what I have used
in the past. How can I add the password to this code to
allow the table to download correctly?



Set dba = OpenDatabase("C:\his\l\K.mdb")
Set rst = dba.OpenRecordset("IA", dbOpenDynaset,
dbReadOnly)
Sheets("Form").Select
[a1].CopyFromRecordset rst
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Download

wrote ...

I am using the following code in VBA Excel to try and
download an Access table. The access table is password
protected


I am aware of database security (password for the file) and workgroup
security (userID with password).

this code is an example of what I have used
in the past. How can I add the password to this code to
allow the table to download correctly?

Set dba = OpenDatabase("C:\his\l\K.mdb")
Set rst = dba.OpenRecordset("IA", dbOpenDynaset,
dbReadOnly)
Sheets("Form").Select
[a1].CopyFromRecordset rst


You can specify the password (and userID if applicable) in the
connection string. See:

http://msdn.microsoft.com/library/de.../D2/S5A2CF.asp

http://msdn.microsoft.com/library/de.../D2/S5A28B.asp

Jamie.

--
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
download csv shakey[_2_] Excel Discussion (Misc queries) 0 March 17th 09 11:36 PM
items chosen to download are NEVER all there after download comple jwhitehurst New Users to Excel 3 November 9th 07 04:00 PM
Useful add-ins to download [email protected] Excel Worksheet Functions 2 March 17th 06 07:15 PM
Useful add-ins to download [email protected] Excel Discussion (Misc queries) 0 March 17th 06 04:21 AM
how can i download sarfer Excel Discussion (Misc queries) 1 January 9th 06 09:26 PM


All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"