M
MAR
I have a lock button, but is not working properly, 'It will only allow me to
lock the first time and first page after 'hitting the lock button again, I
want to lock each case as being 'completed and be able to edit and lock
anytime......HEEELLLLLPPPPPP!!!!!!!!
Option Compare Database
Private Sub addingBtn_Click()
On Error GoTo Err_addingBtn_Click
DoCmd.GoToRecord , , acNewRec
Exit_addingBtn_Click:
Exit Sub
Err_addingBtn_Click:
MsgBox Err.Description
Resume Exit_addingBtn_Click
End Sub
Private Sub CloseBtn_Click()
On Error GoTo Err_CloseBtn_Click
DoCmd.Close
Exit_CloseBtn_Click:
Exit Sub
Err_CloseBtn_Click:
MsgBox Err.Description
Resume Exit_CloseBtn_Click
End Sub
Private Sub modifyBtn_Click()
On Error GoTo Err_modifyBtn_Click
'Forms!Employees!EmployeeID.SetFocus
Me.Text2.SetFocus
'Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_modifyBtn_Click:
Exit Sub
Err_modifyBtn_Click:
MsgBox Err.Description
Resume Exit_modifyBtn_Click
End Sub
Private Sub LockBtn_Click()
On Error GoTo Err_LockBtn_Click
'Clicking this button will prevent the user from editing
Me.AllowEdits = False
Exit_LockBtn_Click:
Exit Sub
Err_LockBtn_Click:
MsgBox Err.Description
Resume Exit_LockBtn_Click
End Sub
Private Sub EditBtn_Click()
On Error GoTo Err_EditBtn_Click
'Clicking this button will allow to edit once is being locked
Me.AllowEdits = True
Exit_EditBtn_Click:
Exit Sub
Err_EditBtn_Click:
MsgBox Err.Description
Resume Exit_EditBtn_Click
End Sub
lock the first time and first page after 'hitting the lock button again, I
want to lock each case as being 'completed and be able to edit and lock
anytime......HEEELLLLLPPPPPP!!!!!!!!
Option Compare Database
Private Sub addingBtn_Click()
On Error GoTo Err_addingBtn_Click
DoCmd.GoToRecord , , acNewRec
Exit_addingBtn_Click:
Exit Sub
Err_addingBtn_Click:
MsgBox Err.Description
Resume Exit_addingBtn_Click
End Sub
Private Sub CloseBtn_Click()
On Error GoTo Err_CloseBtn_Click
DoCmd.Close
Exit_CloseBtn_Click:
Exit Sub
Err_CloseBtn_Click:
MsgBox Err.Description
Resume Exit_CloseBtn_Click
End Sub
Private Sub modifyBtn_Click()
On Error GoTo Err_modifyBtn_Click
'Forms!Employees!EmployeeID.SetFocus
Me.Text2.SetFocus
'Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_modifyBtn_Click:
Exit Sub
Err_modifyBtn_Click:
MsgBox Err.Description
Resume Exit_modifyBtn_Click
End Sub
Private Sub LockBtn_Click()
On Error GoTo Err_LockBtn_Click
'Clicking this button will prevent the user from editing
Me.AllowEdits = False
Exit_LockBtn_Click:
Exit Sub
Err_LockBtn_Click:
MsgBox Err.Description
Resume Exit_LockBtn_Click
End Sub
Private Sub EditBtn_Click()
On Error GoTo Err_EditBtn_Click
'Clicking this button will allow to edit once is being locked
Me.AllowEdits = True
Exit_EditBtn_Click:
Exit Sub
Err_EditBtn_Click:
MsgBox Err.Description
Resume Exit_EditBtn_Click
End Sub