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  

Same subform on two different main forms



 
 
Thread Tools Display Modes
  #1  
Old December 13th, 2006, 04:39 PM posted to microsoft.public.access.forms
PHisaw
external usenet poster
 
Posts: 224
Default Same subform on two different main forms

Hi,

I have a subform "fWorkLog" that has fields for Tech, StartTime, StopTime,
Work Code and Part Number. This subform works well on main form
"fGeneralInfo" linked by job number. I have the following code for
"PartNumber" to be visible only when "fGeneralInfo" has PumpType =
Manufacturing.

Private Sub Form_Open(Cancel As Integer)
If Forms!fGeneralInfo!PumpType = "Manufacturing" Then
Me.CboPartNumber.Visible = True
Me.CboPartNumber_Label.Visible = True
Else
Me.CboPartNumber.Visible = False
Me.CboPartNumber_Label.Visible = False

End If
End Sub

I want to use the same subform on main form "fPkgWork" linking by job
number. The problem lies with the code for PartNumber. Is there anyway I can
make this one subform work for both main forms?

As always, any help is greatly appreciated.
Thanks,
Pam
  #2  
Old December 13th, 2006, 10:20 PM posted to microsoft.public.access.forms
PHisaw
external usenet poster
 
Posts: 224
Default Same subform on two different main forms

Please disregard post - have figured out solution.

"PHisaw" wrote:

Hi,

I have a subform "fWorkLog" that has fields for Tech, StartTime, StopTime,
Work Code and Part Number. This subform works well on main form
"fGeneralInfo" linked by job number. I have the following code for
"PartNumber" to be visible only when "fGeneralInfo" has PumpType =
Manufacturing.

Private Sub Form_Open(Cancel As Integer)
If Forms!fGeneralInfo!PumpType = "Manufacturing" Then
Me.CboPartNumber.Visible = True
Me.CboPartNumber_Label.Visible = True
Else
Me.CboPartNumber.Visible = False
Me.CboPartNumber_Label.Visible = False

End If
End Sub

I want to use the same subform on main form "fPkgWork" linking by job
number. The problem lies with the code for PartNumber. Is there anyway I can
make this one subform work for both main forms?

As always, any help is greatly appreciated.
Thanks,
Pam

 




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


All times are GMT +1. The time now is 07:40 AM.


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