473,426 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

Password specific forms

stonward
145 100+
Hi ya again,

I don't see any real problem ,but has anyone attached a password to specific forms? I need a way to stop 'normal' users from 'doing something' to the data thru a form, and, frankly, the usual workgroup method is cumbersome at best (and doesn't work with individual forms, no?). it only has to be a 'padlock'...no ones going to go digging deeper to break it, but (I guess), I need to pause any code/events....ho hum....no, couldn't the password 'box be modal? that would stop any processes wouldn't it?

Sorry, thinking while asking. But you see what I'm after?

Stonward the Cuffuffled
Aug 10 '07 #1
5 1875
missinglinq
3,532 Expert 2GB
Is this a split database? If so, why not simply have two different frontends. In the one for the "common folks" set all forms to read-only.

For the form goto Properties - Data and set AllowEdits, AllowAdditionsAllowDeletions and to No.

And you're correct, Access' native security is a mare's nest!


Linq ;0)>
Aug 10 '07 #2
barry07
47
I agree with you that Access Workgroup security is very cumbersome and I don't use it. I had to solve a problem like yours in the past and what I did was to create two versions of the forms, one of which was read-only (set Allow Edits, Allow Additions and Allow Deletions all to 'No' in the Data tab of the form properties. Make this the default form and have a second copy with these set to Yes which is only accessible when the user enters a password.

(I'd suggest an Update button on the default form which would open a password dialog. Entering the correct password will open the updateable form, if an incorrect password is entered open a messagebox to this effect).

If you'd like to see the code let me know

Good luck!
Aug 10 '07 #3
stonward
145 100+
ha ha! Looks like I touched a raw one with Access security, eh?! In the last version of the DB I'm working on I remember spending a great deal of time going round and around learning how the 'security' worked.

The database is split: can you post your code for me Barry07? i'd be most grateful. I thought of the second frontend idea Linq, but just wonder about the complexities and performance issues? have you tried that idea in the past?

Thanks for all your hel, folks. Just knowing others are/have tackled the same problems is a real comfort as I'm sure you're aware!

Thanks again,

Stonward the Comforted
Aug 10 '07 #4
barry07
47
Suppose you have a button lablelled UPDATE in the standard (read-only). form. The click-event for this button opens a password-input form ("frmPassword") which has one text box only. On the DATA tab of the properties for this text box set Input Mask to password so that the password is displayed as "******" as the user enters it.

The code for the click-event would read as follows

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub cmdUpdate_Click()
  3. DoCmd.OpenForm "frmPassword"
  4. End Sub
  5.  
The code in the password-input form will read
Expand|Select|Wrap|Line Numbers
  1. Sub txtPassword_AfterUpdate()
  2. If txtPassword = gPassString Then
  3.     DoCmd.OpenForm "MyEditableForm"
  4. Else
  5.     MsgBox "Incorrect password", 
  6. End If
  7. End Sub
  8.  
In accordance with the Good Practice standards advocated by this group you should define the actual password as a global constant in a code module, so you only have to change it once:

Expand|Select|Wrap|Line Numbers
  1. Global const gPassString="mypassword"
Don't hard-code it in the form.
Aug 10 '07 #5
stonward
145 100+
Thanks Barry07!

Have a great day, people.

Later,


stonward
Aug 13 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Lou | last post by:
Please can someone put me out my misery! Im trying to find a multiple user/password protection script that will redirect the specific user to a specific directory. At the moment I have set up...
12
by: Pat A | last post by:
We have a dilemma. We are storing our database password in an include file that resides outside of the web root. The password is in plain text. So, no one can get that password because it can't...
7
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong,...
3
by: Whitey | last post by:
I have a password secured database. After the password is entered the user has a form that I created that allows them to search the database and retrieve information. The problem is that the...
0
by: Vincenzo Ciancia | last post by:
Hi all, please forgive me for what might be a FAQ but I can't find how to solve my problem. I am involved in a relatively big project where we used visual studio to design our forms, including...
2
by: Brian Roccoforte | last post by:
I'm trying to create a login and password field that will take the user to their own designated personal user page, depending on the username and password used. I am using an access database...
1
by: Gekotec | last post by:
how can i make a form that allows the user to enter a username and password to connect to a different application or website. i know that linking buttons to apps or websites is this: ...
3
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post by:
Hi, we've got a strange problem here: We've created an ASP.NET 2.0 web application using Membership.ValidateUser() to manually authenticate users with our website. The problem is: If the...
0
by: calvinkwoo3000 | last post by:
My Window application run property withour link to mdb without password. Once i set security password to mdb file, the error belor come out when i click detail. Not a valid password. and detail...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.