T
Tony
i have a subform binding (following code) to another subform.
i am using Pentium II w/ XP Access, seems not relevant to my problem
when i go into record 1 of subform [mainform record 1] (A), it is not
allowed to change by the following code.
when i go into record 1 of subform [mainform record 2] (B), it should allow
but not, seem remember (A)
then i go into record 2 of subform [mainform record 2], it allows to edit
then i go back to (B), now it works to allows to edit
then i go into record 1 of subform [mainform record 3] (C), it should not
allow but it allow, seem remember (B)
then i go into record 2 of subform [mainform record 3], it does not allow to
edit
then i go back to (C) now it works to disallow to edit
The following code does not effect immediately? how can i solve it?
Thanks a lot in advance.
***************************************
Private Sub Form_Current()
Dim assignperson As String
assignperson = CurrentUser()
If Forms!admin![Form_assignee]!assignee <> assignperson Then
Me.AllowEdits = False
ElseIf Forms!admin![Form_assignee]!assignee = Null Then
Me.AllowEdits = True
Else
Me.AllowEdits = True
End If
End Sub
i am using Pentium II w/ XP Access, seems not relevant to my problem
when i go into record 1 of subform [mainform record 1] (A), it is not
allowed to change by the following code.
when i go into record 1 of subform [mainform record 2] (B), it should allow
but not, seem remember (A)
then i go into record 2 of subform [mainform record 2], it allows to edit
then i go back to (B), now it works to allows to edit
then i go into record 1 of subform [mainform record 3] (C), it should not
allow but it allow, seem remember (B)
then i go into record 2 of subform [mainform record 3], it does not allow to
edit
then i go back to (C) now it works to disallow to edit
The following code does not effect immediately? how can i solve it?
Thanks a lot in advance.
***************************************
Private Sub Form_Current()
Dim assignperson As String
assignperson = CurrentUser()
If Forms!admin![Form_assignee]!assignee <> assignperson Then
Me.AllowEdits = False
ElseIf Forms!admin![Form_assignee]!assignee = Null Then
Me.AllowEdits = True
Else
Me.AllowEdits = True
End If
End Sub