Password on a field

Rendbre

Registered User.
Local time
Today, 08:46
Joined
Dec 22, 2009
Messages
14
Hi

I hope you guys can help me. I have created a simple database to handle requests for premium freight and I have a tick box to show approval status. I have put the following code on a form to have a password, set the checkbox and lock it.

Code:
Private Sub Command48_Click()
If InputBox("Enter Password", "Approved") = "approve" Then
Me.Approved = True
Me.Approved.Locked = True
Else
MsgBox ("Incorrect Password")
Me.Approved = False
End If
 
End Sub

This only seems to work whilst viewing the record in that form. Does anyone know how I can expand this code to go back to the table and fix that check box in the original table so that it cannot be changed again?

Thanks,

Ben
 
Does anyone know how I can expand this code to go back to the table and fix that check box in the original table so that it cannot be changed again?

Are you requesting a way to have Access automatically require the password in order to be able to change the check box state of that field/record in a raw table view UI object? If so, not possible.

Simple table view controls do not interact with VBA code attached to forms.
 
Im trying to have a password to lock a field in a table once it has been set. It
 
lock a field in a table

Again...

Simple table view controls do not interact with VBA code attached to forms.

In a Form, you can use VBA to enforce validation rules.

Simple Tables are not able to run VBA validation rule code. There is no way outside of forms to enforce validation rules with VBA code.
 

Users who are viewing this thread

Back
Top Bottom