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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing user and pwd to instance of Access

Status
Not open for further replies.

jojones

Programmer
Dec 4, 2000
104
AU
I have the following in VB...

Public Sub Main()
Dim myAccess As Access.Application

Set myAccess = New Access.Application
myAccess.OpenCurrentDatabase ("C:\Test.mdb")
myAccess.Run "myProcedure"
myAccess.Quit
Set myAccess = Nothing

End Sub

It work just fine, however we have an Access MDW workgroup setup on our network and when Access is instantiated it prompts for the user and password. In a batch file I would use:
/user "username" /pwd "password"

How can I get past this with code?

Thanks in advance. :)
 
This doesn't work. It still prompts me for the username because it is a workgroup username & pwd rather than a db username & pwd.

Any more ideas?

Thanks
Jo [penguin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top