How to Protect Old Records in a Form but can Edit New Records

Anwar1968

Registered User.
Local time
Today, 04:02
Joined
Apr 13, 2014
Messages
31
Hello everyone.. I have a form which needs update ever month. When the form is pened, the end user can see the old records and data, and also a new recored is added for any new data. I want to protect the old saved data and the user can only add, edit, or delete the new data in the newly added record. The problem is once a user adds the new data and moves to a nother record or another form, then he/she cannot edit or change the new data in case if there is any mistake or need to change something after couple of minutes. I changed the Form Data Properties "Allow Additions", "Allow Edits", and "Allow Deletions" many different times and situations to solve this problem but with no success.
I tried the following with NO success too: One of the Fields of the Record is (Month). In the Data Properties, I set a Default Value for this field as(December 2014) for instance. I set the Data Properties "Allow Additions", "Allow Edits", and "Allow Deletions" to (Yes). Then I put the follwoing code in the Form's Current Event:

Private Sub Form_Current()
If Me.month.Value = "December 2014" Then
Me.AllowAdditions = True
Me.AllowEdits = True
Me.AllowDeletions = True
Else
Me.AllowAdditions = False
Me.AllowEdits = False
Me.AllowDeletions = False
End If
End Sub

Any suggestion, correction, ideas please?? Thank you so much.
Anwar
 
Have you considered two forms? One form that displays existing data. If new data is to be entered, then click a button which opens up a second form for data entry only.

Steve.
 
Thank you Steve for your reply and suggetion. Surely I will consider this. But I thought there is another way or code to use the same form. By the way, the main form has couple of subforms and tabs which show different records and info of one client/person at one time. Thats why I prefer not adding a new subform and I am looking for another approach to make everything less complicated.
Again, thank you so much Steve.
Anwar
 
Thank you Steve for your reply and suggetion. Surely I will consider this. But I thought there is another way or code to use the same form. By the way, the main form has couple of subforms and tabs which show different records and info of one client/person at one time. Thats why I prefer not adding a new subform and I am looking for another approach to make everything less complicated.
Again, thank you so much Steve.
Anwar

Don't dismiss the value of two forms too quickly. The data entry form does not need to also include sub-forms. If the primary data is a person's name, just data enter the name, on saving, close the data entry form, return to the existing data form, navigate to the newly created record.

Open the data entry form as modal, must either save or cancel to return to the calling form.

Steve.
 

Users who are viewing this thread

Back
Top Bottom