Lilfiger19
New member
- Local time
- Today, 16:26
- Joined
- Mar 16, 2015
- Messages
- 6
Hi,
I am trying to figure out how to trigger the below VBA Code under one Change() Event once a selection is made from the only combobox on my form. Can anyone help me with this?
I am trying to figure out how to trigger the below VBA Code under one Change() Event once a selection is made from the only combobox on my form. Can anyone help me with this?
Code:
Private Sub cbxAssociate_Change()
Me.txtFIRJuly14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Jul-14'")
Me.txtFIRAugust14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Aug-14'")
Me.txtFIRSeptember14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Sep-14'")
Me.txtFIROctober14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Oct-14'")
Me.txtFIRNovember14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Nov-14'")
Me.txtFIRDecember14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Dec-14'")
End Sub