What to do when SQL Server login failed?

D

danlin

The linked tables in my Access 2003 db is on SQL Server. I have an autoexec
macro that opens up a form but opens anyway even if the SQL login
authentication failed. How can I prevent the macro to run when the user
entered an incorrect username or password? TIA.
 
C

Chris Burnette

Something you might consider rather than using an Autoexec macro is just
making your form the startup form. What I do is to use a login form (just an
unbound form with text boxes for username and password) that connects to the
back-end via a connection string and passes the username and password to SQL
Server via that connection.

Of course, I use SQL Server authentication, so the answer might be different
if you use Windows Authentication. Still, this solution seems to work
reasonably well, although it does take some time to get it working.

-Chris
 

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