lock record after approval

steve111

Registered User.
Local time
Today, 20:33
Joined
Jan 30, 2014
Messages
429
hi,

is there a way that when I field gets a password entered into a field the form can be locked so nothing on that record or subform linking to that record can be altered

thanks
steve
 
Why not lock the form completely from edits? If you need to edit the data enter a password to enable edits? No need to save a redundant field.
 
hi ,

the purchase order will go for approval ( normally paper copy ) but I have put it into access of which a copy of it will be sent to the manager for approval .
he could tell the purchaser to change this or that and send for re- approval

what I have done is put a password field in so when he has completed it the purchase is now ok to buy ,but I don't want any one changing it after that approval

steve
 
So if you were to add an approved date to your PO record you could use that to lock it down? e.g. if it's been approved you can't edit it.
It will give as much protection as a password tbh, as anyone with enough savvy could open the record directly in the table to fiddle with it if they really wanted to. You will find it very difficult to lock down a specific record in a table, short of moving approved PO's into a different table that can only be read. (Messy and very inefficient)

We use a electronically signed pdf copy stored centrally, The unsigned ones sit in a queue waiting for Purchasing to sign off (digitally) and save. We than have a document link to that. No-one can really do much with it to alter it and we don't have any paper PO's any more.
 
HI
We use a electronically signed pdf copy stored centrally, The unsigned ones sit in a queue waiting for Purchasing to sign off (digitally) and save. We than have a document link to that

Do you mind explaining how to do that.
I at present do have a pdf report of the order but I don't know how to do what you do

steve
 
hi

pressed the reply button by mistake before I had finished my last post
could you please also explain how I could lock it down with a data input

the users will not be able to get to any tables

steve
 
To answer your questions about face;
You can lock the edits based on the field contents using the on current property. There are numerous methods - I use a tag on the fields I want to lock then run a loop to set all controls with the appropriate tag to locked = true. Your code would be something like
Code:
If IsNull(Me.DateApproved) Then
    Code to unlock controls here
Else
    Code to lock Controls here
End If
Search for looping through/locking controls on here and you will find what you need.

Secondly - storing / processing PO's as PDF's. Our system is a little complex as we have a link in to an external accounts package. The outline of the system is that once someone raises a PO it is saved unsigned on a network shared folder simply with the POnumber.pdf as the file. We then query this folder for PO numbers matching PO's raised in the accounts package. This is listed on an automatically refreshed form, any unapproved matching PO's listed can be opened from the form, allowing the Purchasing manager to sign it and save it electronically as POnumber_signed.pdf .
This file is then copied to a read only network location specific to the supplier, verified as copied okay, then deleted from the waiting approval folder. The signed PO is automatically emailed back to the person that created it, ready for them to process on to the supplier. The Manager can also reject or put on hold a PO with an accompanying text note, in which case it is emailed back without being signed pending further action.

Whilst none of the individual tasks above were particularly complex, it took a little while to get it all working as a simple button pushing exercise for the end users.
As with all DB projects we had to break it down into simple small steps to get a working solution.
 
The first and foremost rule for this is that your users can only be allowed to see forms, not the navigation pane.

The way I do something similar to what you describe is that I have a flag on records showing whether they are locked or not. When the form executes a Form_Current event, you can see the fields of the underlying record, so you can see the data field that indicates lock status. In my code, if the record is locked, I set the form's .EditAllowed to FALSE. (Check the spelling on that one, I'm shooting from the hip here. Could be "EditsAllowed" just as well.)

If your users can get to the navigation pane, this DOES NOT WORK. They can bypass anything you could do to block edits from your forms.
 

Users who are viewing this thread

Back
Top Bottom