sub form

  • Thread starter Thread starter tony wong
  • Start date Start date
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
 
Hi Tony

To reference subforms the general expression is as follows:

forms!myMainForm!mySubForm.Form


Hope this helps

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
i find all the combinations but still fail to find the full path of the
subform

is there any way to check it out?

Thanks a lot.


StCyrM said:
Hi Tony

To reference subforms the general expression is as follows:

forms!myMainForm!mySubForm.Form


Hope this helps

Maurice St-Cyr
Micro Systems Consultants, Inc.
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?
 
Hi Tony

I sent you the proper syntax to accomplish the task. Can you post the names of
your forms and also the syntax that you are using to access your subform?

Best regards

Maurice St-Cyr
Micro Systems Consultants, Inc.



i find all the combinations but still fail to find the full path of the
subform

is there any way to check it out?

Thanks a lot.


StCyrM said:
Hi Tony

To reference subforms the general expression is as follows:

forms!myMainForm!mySubForm.Form


Hope this helps

Maurice St-Cyr
Micro Systems Consultants, Inc.
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?
 
Thanks a lot Maurice

i should have found the path but it is strange in result.

i posted for assistance in formcoding newsgroup.




StCyrM said:
Hi Tony

I sent you the proper syntax to accomplish the task. Can you post the names of
your forms and also the syntax that you are using to access your subform?

Best regards

Maurice St-Cyr
Micro Systems Consultants, Inc.



i find all the combinations but still fail to find the full path of the
subform

is there any way to check it out?

Thanks a lot.


StCyrM said:
Hi Tony

To reference subforms the general expression is as follows:

forms!myMainForm!mySubForm.Form


Hope this helps

Maurice St-Cyr
Micro Systems Consultants, Inc.

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?
 
Back
Top