Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Value of combo on main form to make combo on subform visible= Errors 1

Status
Not open for further replies.

capndave

Technical User
Mar 4, 2003
36
US
I have combined information from several FAQ and postings and have not been successful with this code:

Private Sub TypeOccur_AfterUpdate()


If TypeOccur.Value = "60" Then
Me!frmsubTxnDetail.SetFocus
Me!frmsubTxnDetail.cboTxnRxn_Label.Visible = True
Me!frmsubTxnDetail.cboTxnRxn.Visible = True

Else
Me!frmsubTxnDetail.SetFocus
Me!frmsubTxnDetail.cboTxnRxn_Label.Visible = False
Me!cboTxnRxn.Visible = False
End If
End Sub

with err message at 3rd line "Run time 438 Object does not support this property or method"

I have tried referring to dependent combo label as

Me!cboTxnRxn_Label.Visible = True which also does not work.

My intention is to include several if/then based on OccurType combo value to make visible different combos on frmsubTxnDetail

Thanks
 
How are ya capndave . . .

Be aware: [blue]you can't hide a control while it has the focus![/blue] Also, attached labels hide/unhide with the control.
Code:
[blue]   Dim sfrm As Form
   
   Set sfrm = [frmsubTxnDetail].Form
   
   If Me!TypeOccur = "60" Then
      sfrm!cboTxnRxn.Visible = True
   Else
      sfrm!cboTxnRxn.Visible = False
   End If
   
   Set sfrm = Nothing[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top