Dear Friends
I have a subform, the content of which will be manipulated conditionally. If in the main form, the txtUserName and the txtStaff are equal, the content in the subform can be edit, delete and add new record. I used the following code to do this.
All works well. but the problem is when I add new record in the main form, (txtUserName and txtStaff are equal) the New Row does not appear in the subform.
How should I solve it?
Thanks in advance
I have a subform, the content of which will be manipulated conditionally. If in the main form, the txtUserName and the txtStaff are equal, the content in the subform can be edit, delete and add new record. I used the following code to do this.
Private Sub Form_Current()
Me.Refresh
If Forms!RDQA!txtUserName = Forms!RDQA!txtStaff Then
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True
Else
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False
End If
End Sub
All works well. but the problem is when I add new record in the main form, (txtUserName and txtStaff are equal) the New Row does not appear in the subform.
How should I solve it?
Thanks in advance