cancel system login prompt

S

Sam

the access to the application is with sql server Authentication
for login i use a login form
but before it opsen's there is a system login prompt
how can i cancel this prompt?

thanks
 
S

Sam

It's ok
but now their is a new problem
the login form supose to read user name from a connected table
but because of canceling the system login prompt the table is yet
unconnected
when login form activate


giorgio rancati said:
Hi Sam,

before closing the project, clear the connection string
----
Currentproject.Openconnection ""
----

bye
--
Giorgio Rancati
[Office Access MVP]

Sam said:
the access to the application is with sql server Authentication
for login i use a login form
but before it opsen's there is a system login prompt
how can i cancel this prompt?

thanks
 
G

giorgio rancati

Hi Sam.

Before open the login form, you can reconnect the project or read the table
in a separate connection to the server, then reconnect the progect

Open a recordset in separate connection
-----
Dim Cn As ADODB.Connection
Dim Rs As ADODB.Recordset
Set Cn = New ADODB.Connection
Set Rs = New ADODB.Recordset

Cn.Open "Provider=SQLOLEDB.1" & _
";Data Source=ServerName" & _
";Initial Catalog=DbName" & _
";User Id=UserName" & _
";Password=UserPassword"

Rs.Open "Select * From Tablename", Cn, adOpenKeyset, adLockOptimistic
.......
.......
Rs.close
Set Rs=Nothing
Cn.Close
Set Cn=Nothing

----

reconnect the project
----
If Currentproject.IsConnected=False Then
Currentproject.OpenConnection _
"Provider=SQLOLEDB.1" & _
";Data Source=ServerName" & _
";Initial Catalog=DbName" & _
";User Id=UserName" & _
";Password=UserPassword"
End if
 

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