Start access by asking for sql server login

T

Tina

I have a need to start access by having users login
with their userid/pwd (this should be authenticated
against sql server database).

How can I do in Access.

At present if I run a form, then it asks for userid
password, I want to do at the time or launch.

Next how can I retrieve it in Access to be used with
my queries?

Thank you in advance,
Tina
 
J

jj

hi, try this:

Dim rs as adodb.recordset
set rs=new recordset
rs.activeconnection = "provider=SQLOLEDB; Data
source=dbservername; database=dbname; User ID=sa;
Password=pwd;"
rs.source="select * from table1"
rs.Open

good luck!

jj
 

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