|
-
Dec 19th, 2001, 03:20 AM
#1
Thread Starter
Member
TransferText in Access -> VB
I'm using this code in VB to use the TransferText method from the access 2000 object...
<
Set objAcc = New Access.Application
objAcc.OpenCurrentDatabase strDatabasePath, False
objAcc.DoCmd.TransferText acExportDelim, "Nummeringen", "Nummeringen", strNummeringen
>
This works fine UNTIL I start using the password-security from
the access 2000 DB...
I just can't figure out how I can open the database using the Access object and pass the password without having a popup screen
that askes me to enter the password.
Does anyone know how to open a database with a password by using the Access object???
Thx! Your help is appreciated!
-
Dec 19th, 2001, 05:14 AM
#2
-= B u g S l a y e r =-
VB Code:
'add a ref to DAO
Option Explicit
Private acc As Access.Application
Private Sub Command1_Click()
Dim db As DAO.Database
Set acc = New Access.Application
Set db = acc.DBEngine.OpenDatabase("C:\test.mdb", False, False, ";PWD=test")
acc.OpenCurrentDatabase "c:\test.mdb", True
db.Close
Set db = Nothing
acc.Visible = True
End Sub
think that does the job.. needs DAO thouhg...
-
Dec 19th, 2001, 07:40 AM
#3
Thread Starter
Member
Thanks Peet :-)
I'm going to try this solution... Only one thing;
I've already made an export-function of the data myself now
(couldn't wait for a solution hey)...
Thanks again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|