Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prvent changing a record

Status
Not open for further replies.

edgarchado

Technical User
Apr 5, 2005
59
AR
Hi to all,

Is there a way to "commit" a record in a form and make it "unchangeable". In other words, I need to put a button in a form wich will save the current record and won´t let anyone change it anymore.

Is this possible???

Thanks
 
Who is "anyone"? There certainly are ways to set a form to prevent editing. Look up the AllowEdits form property in Help. Assuming you want to enter new records, but not allow changing one the record is not new, also look up the NewRecord property for a form. You can use these tools to, at least, prevent inadvertent editing. However, if you are not using User-Level Security, there is little to stop a user from circumventing these measures.
 
What I would need is for a user, after editing an order and being sure it is not going to change, click on a button making this record "static" and "unchangable"

Thanks
 
Under those conditions, you might consider adding a field to the table to flag the record as "fixed". Perhaps a boolean (yes/no) field and have a checkbox for the user to check when the record is to become static. You could have the checkbox either hidden or not enabled and use a command button to actually perform the checking. Then, in your form's OnCurrent event check the field. If it is set (yes or -1) then set the form's AllowEdits and AllowDeletes properties to FALSE - otherwise, set them to TRUE.

Now, back to my original question, "Who is anyone"? Are your users able to access the database window? Can they edit forms or open tables directly? Are they using full MS Access or a run-time version? My point being, if you don't have other security measures in place, someone WILL manage to change your records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top