Is there any way to find out username pwd in Access

  • Thread starter Thread starter Lara
  • Start date Start date
L

Lara

How do I retrieve the username and password in Access
for Sql server logon?

I have linked tables to sql server and upon launch of
forms, I enter the username and password, these are
sql server usernames and passwords.

I would like to use these usernames elsewhere in my
forms/reports, is there any way I can use it?

for eg. select * from table1 where field1 = username

Thanks for your help in advance,
-Lara
 
create global vars in a modular unit
then have the form store the data there.
then any code can retrieve it.
 
Van,

select current_user works fine on sql server, but
it doesn't work in access. In access it is looking for
from table name.

Any ideas???

Thank you,
Lara
 
If Access allowed obtaining the user's password through the programming
interface, that would be a big security hole, and Microsoft did not allow it
for that reason. If this were available, any application the user ran could
have a piece of code in it that could steal the user's password, store it
somewhere, then the programmer could use that info to gain that user's
permissions to any other (e.g. personal) Access databases.
 
Steve,

This cannot be construed as a security hole. This is
my need. I need to print the name of the user who is
printing report on top for our records.

I don't want to see someone's password or modify someone's
password. Just to be able to get the username
for printing purposes.

Thanks,
-Lara
 
Of course, it doesn't work in an Access Query.

Use CURRENT_USER in a Pass-Through Query.
 
I understand that you need it, but Access doesn't do it. You'll have to find
an alternative.

What you want to -do- is not a security hole, but what others could do with
that feature if it existed it definitely a security hole.
 
Back
Top