INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Security

Replacing The Secured Database Login WIndow by SgtJarrow
Posted: 20 Dec 02 (Edited 21 Sep 06)

I have to begin by giving JeremyNYC a big Thanks for helping me figure this one out.....Without his help, I may never have reached the final product!

One of the most annoying things I found about using a secured database, is the fact that you cannot change the little form that prompts for user name a password.  You spend all the time developing this great application/database, and you are left with this ugly little form.  Well, Although I haven't found a way to modify it, I have found a way around it...

The below instructions walk you through setting up an intermediary database...with a nice login form as you want it.  The users will enter their username and password here, which will be passed as parameters to a shell command to open the normal database, bypassing the little login screen normally associated with secured databases.

First, develop your database as you want it.  Get it all set up with your security and everything.

Next, create a separate database.  Place one form in it, and set this form to be started automatically.  On the form, put two text boxes and two commmand buttons.  One of the command buttons is for Cancel and only has:
DoCmd.Quit
for its OnClick event procedure.

Name the text boxes   User   and   Pass.   Set the InputMask propterty of the Pass box to
Password

The final command button is Login and gets the following code in its OnClick event:

'********  Start Code  ***********
Dim strPath As String

strPath = Chr(34) & "fullpathtomsaccess.exe" & Chr(34) & " " _
    & Chr(34) & "fullpathtodatabase" & Chr(34) & " " _
    & "/wrkgrp " & Chr(34) & "fullpathtoworkgroupfile" & Chr(34) & " " _
    & "/User " & Chr(34) & Me![User] & Chr(34) & " " _
    & "/Pwd " & Chr(34) & Me![Pass] & Chr(34)

' Debug.Print strPath    ' Uncomment this line to have the strPath variable displayed in the immediate window

Shell strPath, vbMaximizedFocus
Application.Quit

' *******  End Code  *************

The only thing left to do is change the path to Access (the first line of the strPath above), the path to the db (second line), and path to workgroup file (third line).

Then, instruct your users or give them a shortcut to this new database instead of the normal database....

Back to Microsoft: Access Other topics FAQ Index
Back to Microsoft: Access Other topics Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close