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
| FAQ | Members List | 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 Search this Thread Display Modes
  #1 (permalink)  
Old March 1st, 2005, 01:12 PM
Authorized User
 
Join Date: Dec 2004
Location: Las Vegas, NV, USA.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default lock form problem

Hi All
   I need to lock down a form, so only the manager can can edit it?
I feel so lost and don't know how can I start to program this?
   Appreciated for any suggestions!

flyfish
__________________
flyfish
Reply With Quote
  #2 (permalink)  
Old March 2nd, 2005, 01:06 PM
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

Hi,

   The easiest way to do this is to split the database and make a seperate front end for managers. Lock the form in the first front end, and unlock it in the managers' front end. I do this a lot.

   Password protect the different versions of the front ends.

   You can also implement database security, but ONLY DO THIS ON A MICROSOFT NETWORK! If you try this on a network that is not capable of passing MS login credentials (like NetWare) then running the database security wizard will lock the database forever. Hehe.

   You can also do a lame kludge like this: Have two buttons to open a locked and unlocked version of the same form (for each locked field, Properties>Data>Enabled=No, Locked=Yes), and then on the manager's button, put this code:

'==========

   Dim stPassword As String
   Dim stDocName As String

   stDocName = "YourLockedFormName"

   stPassword = InputBox("Enter Password:", vbOkOnly)

   If stPassword = "yourpassword" Then
      DoCmd.OpenForm stDocName etc...
   Else:
      MsgBox "Improper Password" & vbCrLf & "Access Denied"
   End If
'==========

The minor problem with this is that the input box takes the password in plain text.

Most users will never be able to figure this one out. Although they may know <f11> and just open the form directly.

   Um, make sure to set the database window as hidden on your start up options, and name the manager's form something stupid so no one guesses at it (good if there are a lot of forms... of course, they can always open the table directly... anywho...)

HTH.


mmcdonal
Reply With Quote
  #3 (permalink)  
Old March 2nd, 2005, 01:07 PM
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 forgot the best part... migrate to SQL, that will work wonders.

mmcdonal
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Lock carumuga SQL Server 2000 1 June 18th, 2008 03:07 PM
continue topic: form lock down problem flyfish Access 6 March 30th, 2005 11:31 AM
Re: forms lock down problem on Access97 flyfish Access 3 March 17th, 2005 09:09 PM
Re: forms lock down problem on Access97 flyfish Access 0 March 16th, 2005 03:34 PM
problem to "on caps lock progametically Abhinav_jain_mca General .NET 3 August 5th, 2004 03:06 PM



All times are GMT -4. The time now is 06:01 PM.


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