Any help is appreciated

T

Trini Gal

I have a main form with a subform within it. I have the main form set to not
allow edits and additions. When a user wants to enter a new entry, they click
on the ADD NEW button, and that unlocks the fields. If the user wants to
edit existing information, they would click on the EDIT button, which would
open a dialog form, which they would enter their name and today's date, then
click the OK button which is supposed to unlock the form. Its not happening.
Below is my code for the OK button. Someone tried to help me before and I
couldn't get it.

Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Forms!frmADD_LEAK_FORM.AllowEdits = True
DoCmd.Close acForm, Me.Name

Exit_cmdOK_Click:
Exit Sub

Err_cmdOK_Click:
MsgBox Err.Description
Resume Exit_cmdOK_Click

End Sub

Can someone please help me.

Thanks.
 
Top