I have a form which is primarily used is to add new records – not edit the records. Therefore, On the form properties I have AllowEdits = No.
However, there are times in which it is necessary to edit a record. Therefore, I have a button on the form which on click event should allow edits. The code is below
Code:Private Sub cobEdit_Click() If MsgBox("If you change the name it will change all History. Better to create a new account", vbYesNo, "1st Edit Confirmation") = vbYes Then If MsgBox("Are you SURE you want to EDIT?" & vbCrLf & _ "I STRONGLY suggest a new account.", vbYesNo, "2nd EDIT Confirmation") = vbYes Then AllowEdits = True End If End If End Sub
After clicking a button I still cannot edit an item. What am I doing wrong?


Reply With Quote


