I want to loop through the items of a listbox in my form and add the values from a certain column in the listbox to be displayed in a field on the form. How do I do this? This must be a silly question. This is what I have.
Private Sub Hrs_Calc()
Dim i As Integer
Dim JHrs As Double
Set JHrs = 0
For i = 0 To lstResults.ListCount - 1
JHrs = JHrs + Month.[Job Hrs]
Next i
Me.Job_Hrs = JHrs
End Sub
Private Sub Hrs_Calc()
Dim i As Integer
Dim JHrs As Double
Set JHrs = 0
For i = 0 To lstResults.ListCount - 1
JHrs = JHrs + Month.[Job Hrs]
Next i
Me.Job_Hrs = JHrs
End Sub