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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|