waxdart23
Registered User.
- Local time
- Today, 02:15
- Joined
- Nov 20, 2002
- Messages
- 25
I am using the follwing code to count the number of records returned to a list box from a query -
The same query returns a value of days (stored as an integer) to the list box. I would like to find the sum of these days and display them on the form. I have started using the code below but am unsure if this is the correct way to go about it -
I have attached a screen dump of the form to help explain.
Any ideas?
Code:
If Not Recset.BOF And Not Recset.EOF Then
Recset.MoveFirst
Recset.MoveLast
NoOfPeriods = .RecordCount
Else
NoOfPeriods = 0
End If
Code:
If Not Recset.BOF And Not Recset.EOF Then
Recset.MoveFirst
Recset.MoveLast
NoOfDays = NoOfDays + [i]Value of 'tblSickness.TotalDays'[/i]
Else
NoOfDays = 0
End If
Any ideas?