Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 24th, 2006, 08:57 AM
Authorized User
 
Join Date: Jul 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Username & Password

Hi Guys

Can someone maybe help me with a code for a username & password? I don't want to use the normal Access security function as it is not so good.

Thanks,
Hennie:)

 
Old July 24th, 2006, 11:39 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yikes,

   How much coding experience do you have? You can do this by creating a username and password table, or using some outside source for the username and password. Then giving a popup modal form when the app opens, and have the user login. Take the credentials, check them with your source, then open a hidden form and refer to that hidden form for rights. On your username/password source, you can also set rights at various levels (like "Administrator" or "User" group), and then various other discrete rights, and put those in the hidden form. Then, for example, when a form opens, have it check the access rights of the user, and then make certain things invisible if they don't have rights. A form's On Current event might have code like:

Dim sGroup As String

sGroup = [Forms]![frmHidden].[GroupName]

If sGroup = "Administrator" Then
   Me.Button.Visible = True
Else
   Me.Button.Visible = False
End If

'Set the button's Visible property to No to make sure.

   The problem is, most of this is easily thwarted. The built in security is good for most things. The best security, if that is the issue, is to use SQL on the back end, and AD credentials to secure access to various objects and tasks.

Does this help?


mmcdonal
 
Old July 25th, 2006, 12:33 AM
Authorized User
 
Join Date: Jul 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi mmcdonal

I have a lot of sas programming experience but don’t help me a lot with VB; I’m busy trying to learning VB.
I think for now it would be okay if I just use a username and password table to reference to when the application starts up. Later on in the year when I have a bit more VB experience I can just bring out a new version of the program with admin/user rights. Can you maybe help me with a code? I was thinking of creating a form where the user can enter his/her username and password with a submit button. Then use this form when the application starts up.

Please advice.

Kind regards,
Hennie






Similar Threads
Thread Thread Starter Forum Replies Last Post
Memorise ODBC Username & Password in Access DB Roly Reefer Access VBA 23 January 20th, 2012 02:32 AM
Regarding Username and password kuku_ashu Javascript How-To 0 January 4th, 2008 11:28 AM
username and password abhi_loveu2002 ASP.NET 2.0 Basics 1 December 14th, 2006 05:25 AM
Username and password Hennie Access 1 July 28th, 2006 12:43 AM
battling to add username & password too similar... Greywacke Javascript 4 October 8th, 2003 02:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.