Hi All
I have a main form( Employee)and subform( EMP_Task) it is a one to many relationship
On the main form I have a print Preview button
I want to have a code in the Print Preview Button to lock the SubForm( Emp Task) when clicking the Buttton
but i still want the user to have the ability to add a new record but not to modify the old records after clicking print Preview Button
I can lock the Subform using this code
Private Sub Form_Current()
If Me.NewRecord Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If
End Sub
As soon as you move to the new record the old record gets locked
(I can't edit it if the user makes a mistake)
I would like it through the Print Preview button
Regards
I have a main form( Employee)and subform( EMP_Task) it is a one to many relationship
On the main form I have a print Preview button
I want to have a code in the Print Preview Button to lock the SubForm( Emp Task) when clicking the Buttton
but i still want the user to have the ability to add a new record but not to modify the old records after clicking print Preview Button
I can lock the Subform using this code
Private Sub Form_Current()
If Me.NewRecord Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If
End Sub
As soon as you move to the new record the old record gets locked
(I can't edit it if the user makes a mistake)
I would like it through the Print Preview button
Regards