sub form

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
 
S

StCyrM

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.
 
T

tony wong

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?
 
S

StCyrM

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?
 
T

Tony

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top