Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 14th, 2007, 06:40 AM
Authorized User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Users logging on

I have created an ADP front end connecting to a SQL 2000 Database. Due to the current Network Infrastructure I am using SQL authentication for the users to logon.

The Front end will be deployed by Group Policy to Approx 60 Users. However the front end opens the authentication logon box with the Default Username already entered. I want both the Username & Password boxes to be blank ready for the Front end user to type in their credentials.

What I am thinking is that I create a basic SQL User(to use as the default for Data Link) with a Saved Password which allows them just to connect to the SQL database.

With the Autoexec Macro I then open a form asking them to put in their individual logon credentials, which when accepted allows them to input, query the database. Failing logon obviously chucks them out of the system.

Am I going the right way about this???

Reply With Quote
  #2 (permalink)  
Old November 14th, 2007, 09:19 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I have done something similar. What I do is set the start up options to open a form that is bound to a hidden table, and then store their username and password there. Then I open a hidden form with the username and password fields, and keep that open while they are in the database. If they want to run a transaction, then I use the credentials found on the form. The hidden form's on close event runs a delete query to clean out the credentials from the table.

If you want to check their credentials when they first log in, then you can use them to try to open a connection to the database. Like:

On Error Resume Next

Err.Clear
Set cn = New ADODB.Connection
etc...

If Err <> 0 Then
   MsgBox "Please enter proper credentials", vbCritical
   DoCmd.OpenQuery "qryDeleteCredsTable"
   DoCmd.Close 'this intermediate form
   DoCmd.OpenForm "frmLoginForm"
End If

The frmLoginForm should have an application exit button on it, and should be pop up and modal.

Does any of that help?


mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #3 (permalink)  
Old November 14th, 2007, 10:53 AM
Authorized User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the info so far. When you talk about opening a form bound to a hidden table. Am I right in thinking that this table is held on the SQL backend. This will then become a container for logon details when every user who logs.

Reply With Quote
  #4 (permalink)  
Old November 14th, 2007, 10:56 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

No, I was talking about a local hidden table, and local hidden form to take the login credentials from the login form, and then hold them for easy reference when the user wants to make a transaction. These COULD be checked against a table in SQL, which I have also seen done.



mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #5 (permalink)  
Old November 14th, 2007, 10:58 AM
Authorized User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also the hidden table. I presume hidden is not giving them the Select Permission, and giving them the Insert to add their logon details to a record.

Reply With Quote
  #6 (permalink)  
Old November 14th, 2007, 11:07 AM
Authorized User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How do you create a local table in an ADP file. Any table I create ends up on the Backend??

Reply With Quote
  #7 (permalink)  
Old November 14th, 2007, 11:11 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yikes. I missed the ADP issue. You can put the values in public variables then. You could also put the values in a SQL table. The issue is making sure that the text field is a password field, which can be set at the table level, but not at the form level, I think. I don't think SQL Server supports a password field... never did it.


mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Users SpyderSL Access 1 December 20th, 2006 08:40 AM
SSIS - Built-In Logging / Custom Logging ivobecker23 SQL Server 2005 0 April 21st, 2006 06:41 AM
Logging users in access. sampow Access 6 December 16th, 2003 07:50 PM
logging users kosla78 Classic ASP Basics 3 December 8th, 2003 01:52 AM



All times are GMT -4. The time now is 08:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.