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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a caption on a subform

Status
Not open for further replies.

as0125

Technical User
Jun 3, 2004
70
0
0
US
Can anyone please help me with this vba code? I'm trying to set a label caption on a subform, depending on the "IndxType" value on the main form. This code is on the subform's OnLoad event:

Dim indextype As String
indextype = Forms!FrmSearchIndexMain.IndxType

If (indextype = "Mkt") Then
Me.Label34.Caption = "Week Change"
Else
Me.Label34.Caption = "Period Change"
End If

Regardless of what the "IndxType" value is, this label caption keeps showing "Week Change".

Thanks for any help!
 

sorry -- just realized i posted in the wrong section of the site.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top