By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 1,975 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

SQL Server login Form For access

P: n/a
Hi there...

I use SQL server integrated security so when a user opens a database in
access it prompts the username & password in a small popup box on
connection, but I'd like to use my own customised form for the
authentication process, is this possible? I do know that this login popbox
is displayed before any forms are loaded, can it be said that on database
conenct that the form is opened? How will I transfer the values entered into
the login form to the sql server for authentication?

Thanks alot in advance
Rudi Groenewald
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ben
With integrated security I really don't think you can do what you are
asking. The idea behind integrated security is that the Windows logon
account the user has for the machine also logs them on to SQL Server,
there is not need to enter authentication information. If the users are
getting a login box, chances are that you have SQL security or you have
not specified integrated security in your connection string (which I
think would cause an error). You can create your own by creating a form
asking for the authentication information and storing it in variables,
then concatenate the values into your connection string.
Alternately, if you are using linked tables, check the 'Save password
information' box when linking so creditials only need to be supplied once.

HTH
Ben
Rudi Groenewald wrote:
Hi there...

I use SQL server integrated security so when a user opens a database in
access it prompts the username & password in a small popup box on
connection, but I'd like to use my own customised form for the
authentication process, is this possible? I do know that this login popbox
is displayed before any forms are loaded, can it be said that on database
conenct that the form is opened? How will I transfer the values entered into
the login form to the sql server for authentication?

Thanks alot in advance
Rudi Groenewald


Jul 20 '05 #2

P: n/a
hi ben...
Sorry, that was what I meant. If I use SQL security, I need to to popup my
form to ask for the username and password of the user, not only the msgbox
that pops up asking for it, how will I do this?

Thanks
Rudi

"Ben" <be********@NOSPAMhotmail.com> wrote in message
news:3F**************@NOSPAMhotmail.com...
With integrated security I really don't think you can do what you are
asking. The idea behind integrated security is that the Windows logon
account the user has for the machine also logs them on to SQL Server,
there is not need to enter authentication information. If the users are
getting a login box, chances are that you have SQL security or you have
not specified integrated security in your connection string (which I
think would cause an error). You can create your own by creating a form
asking for the authentication information and storing it in variables,
then concatenate the values into your connection string.
Alternately, if you are using linked tables, check the 'Save password
information' box when linking so creditials only need to be supplied once.

HTH
Ben
Rudi Groenewald wrote:
Hi there...

I use SQL server integrated security so when a user opens a database in
access it prompts the username & password in a small popup box on
connection, but I'd like to use my own customised form for the
authentication process, is this possible? I do know that this login popbox is displayed before any forms are loaded, can it be said that on database conenct that the form is opened? How will I transfer the values entered into the login form to the sql server for authentication?

Thanks alot in advance
Rudi Groenewald

Jul 20 '05 #3

P: n/a
Behind the Access login form, in the CLick event of the Login button, you'll
have code like this:

strConnect = "ODBC;DRIVER={SQL
SERVER};SERVER=YourServerName;DATABASE=YourDB;UID= " & txtUID & ";PWD=" & txtPWD

Then you'll need to cycle through the TableDefs Collection and reset the
COnnect properties and use the RefreshLink Method.

Then you'll need to cycle through the QueryDefs collection to reset the Connect
property of any pass-through queries.

If you have any temporary pass-through queries created in code, you'll have to
hold the UID and PWD values in global variables (or better yet, a Class) so
that you can rebuild the connect string on the fly.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.