Using Windows XP sp1 and MsAccess 2002
I would like to change a Label's caption, which is on a subform, when the user changes the value in a combo box on a the main form. How can I do this? here is the code I'm using:
I would like to change a Label's caption, which is on a subform, when the user changes the value in a combo box on a the main form. How can I do this? here is the code I'm using:
Code:
Private Sub cboMes_AfterUpdate()
Dim stMesAb As String
Dim sttitle1 As String
stMesAb = Me.cboMes.Column(2) 'Incializa variable con mes abreviado
If Me.fraFechaInfo = 1 Then 'Año a la fecha
Me.txtMesD = 1
Me.txtMesH = Month(dateFinDeMes)
sttitle1 = getTitle(1, stMesAb)
Forms!frmResumenGastos!Resumen.Controls.lblVarAnoAnt.Caption = sttitle1
'Forms!frmResumenGastos!fsfrGastosPresup_AnoActual_Y_Anterior.Controls.lblVarAnoAnt.Caption = sttitle1
Else 'Mes especifico
Me.txtMesD = Month(dateFecha)
Me.txtMesH = Month(dateFinDeMes)
End If
Me.Resumen.Requery
End Sub