I have a query in sql that I am using via VB6.
esql = "SELECT SUM(Hours) from tblOrgHours where Month(activitydate) < " & SelectedMonth & " And ParticipantHour = 1 And AgencyID = " & AgencyID & " and Fiscal = " & Fiscal
the only problem I am having is that SelectedMonth needs to be the last day of that month. so if SelectedMonth = 9 Then the selection needs to be adjusted to be 9/30 instead.
How can I accomplish this?