Record Lock Problem
Posted on 2005-04-23
I'm using the following code which works okay except that after you access a record once and quit, then access that same record again, it's locked like it is suppose to be, however, if you click the save button you get a message box that says the save command is not available, however, you can then edit the record, in other words, it is no longer locked.
If this doesn't make sense let me know and I'll provide more detail.
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
Me![Locked] = True
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Private Sub Form_Current()
If IsNull(Me![Locked]) Then Me![Locked] = 0
Me.AllowEdits = Not Me![Locked]
Private Sub form_open(Cancel As Integer)
If Me.RecordsetClone.RecordCount = 0 Then
Cancel = True