A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

sub form



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2004, 02:37 PM
tony wong
external usenet poster
 
Posts: n/a
Default sub form

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


  #2  
Old August 19th, 2004, 02:56 PM
StCyrM
external usenet poster
 
Posts: n/a
Default

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?



  #3  
Old August 19th, 2004, 05:08 PM
tony wong
external usenet poster
 
Posts: n/a
Default

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" ¦b¶l¥ó
¤¤¼¶¼g...
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?





  #4  
Old August 19th, 2004, 08:56 PM
StCyrM
external usenet poster
 
Posts: n/a
Default

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" ¦b¶l¥ó
¤¤¼¶¼g...
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?













  #5  
Old August 20th, 2004, 06:50 AM
Tony
external usenet poster
 
Posts: n/a
Default

Thanks a lot Maurice

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

i posted for assistance in formcoding newsgroup.




"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" ¦b¶l¥ó
¤¤¼¶¼g...
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?














 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default values to load up automatically in a form based on value entered in another form Anthony Dowd Using Forms 8 August 12th, 2004 08:53 AM
dlookup miaplacidus Using Forms 9 August 5th, 2004 09:16 PM
copying a form Jim VanGordon Using Forms 3 July 30th, 2004 03:14 AM
Searching Records Melissa Lambino New Users 6 July 20th, 2004 04:51 AM
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM


All times are GMT +1. The time now is 09:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.