Connect with diffrent user

R

Roy Goldhammer

Hello there

I have an adp project

I use sql server authentication.

Is there a way to log on to the adp with diffrent user on any time i run the
project?
 
P

Peter Kaufman

Not sure I follow you, but you can set the SQL user in File
->Connection.

Peter
 
R

Roy Goldhammer

Well Peter

I know that i can set the user there

The problem is that i need a logon window like using access due to workgroup
and not the file->connection window

On one of my computer i have windows 98 and there logon always come up

What i need to do that the logon will always come up when the adp starts?

any help would be useful
 
P

Peter Kaufman

Well,, I said I wasn't sure if I was following you. ;-).

Sorry, Roy, I don't know of a way to do that.

Peter
 
A

Andrew Schonberger

Hi Roy,

I have an identical problem, trying to do client-server
login validation with ADP. I intend to display a login
window, where users will enter their ID and Pwd.

Have you found a solution ? My current plan is to use the
method:
application.CurrentProject.OpenConnection

Sadly, by the time VBA gets control, the connection is
already opened (or may attempt to open, generating an error).

Andrew
 
B

Brian M. Sockey

Hi Roy,

As Andrew mentioned you will need to use the
Application.CurrentProject.OpenConnection command to accomplish this from a
startup form.

However, the trick is that your ADP needs to be in a disconnected state upon
startup for this to work. Otherwise, your code never gets a chance to run.
To place your ADP in a disconnected state, always run the following line of
code just before a user closes your application:

Application.CurrentProject.OpenConnection ""

This code clears your connection properties and allows for your startup code
to reset the connection the next time the ADP is opened. What I recommend
is to run this code from the close event of a hidden form, so that it is
always run as the last command before the app is closed, regardless of how
the app is closed. I normally just hide the startup form and then the code
is run from the close event of the startup form.

The only time this doesn't work is when the ADP is closed due to an
unexpected event such as a power failure.

Hope this helps,

Brian M. Sockey
 
F

Fabiene

Roy Goldhammer said:
Hello there

I have an adp project

I use sql server authentication.

Is there a way to log on to the adp with diffrent user on any time i run the
project?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top