T
tony wong
i have a Main form with sub form A and sub form B
i run the following code in the Main form, it works.
i also wish to run the following code in sub form B but seems the code
cannot recognize [sub form A] in [sub form B].
how can i solve it?
Another question : Can i combine line "Closed" and "Cancelled" into 1 line?
thanks a lot.
*******************************
Private Sub Form_Current()
Dim assignperson As String
assignperson = CurrentUser()
If [sub form A]!assignee <> assignperson Then
Me.AllowEdits = False
ElseIf Status = "Closed" Then
Me.AllowEdits = False
ElseIf Status = "Cancelled" Then
Me.AllowEdits = False
ElseIf [sub from A]!assignee = Null Then
Me.AllowEdits = True
Else
Me.AllowEdits = True
End If
End Sub
i run the following code in the Main form, it works.
i also wish to run the following code in sub form B but seems the code
cannot recognize [sub form A] in [sub form B].
how can i solve it?
Another question : Can i combine line "Closed" and "Cancelled" into 1 line?
thanks a lot.
*******************************
Private Sub Form_Current()
Dim assignperson As String
assignperson = CurrentUser()
If [sub form A]!assignee <> assignperson Then
Me.AllowEdits = False
ElseIf Status = "Closed" Then
Me.AllowEdits = False
ElseIf Status = "Cancelled" Then
Me.AllowEdits = False
ElseIf [sub from A]!assignee = Null Then
Me.AllowEdits = True
Else
Me.AllowEdits = True
End If
End Sub