Hi Folks
I had an unexpected shutdown of my laptop which has caused some major issues with my application, particularly my functions that use Dsum.
Following is an example of my code that is producing a result but not the correct one!
Public Function ThisMonthWeekdays()
Dim StartDate As Date
Dim EndDate As Date
StartDate = DateSerial(Year(Date), Month(Date), 1)
EndDate = DateSerial(Year(Date), Month(Date) + 1, 0)
ThisMonthWeekdays = DSum("[TotalSales]", "QryYTDSales", "[Event] = No And [date1] BETWEEN #" & StartDate & "# AND #" & EndDate & "#")
End Function
Is there something wrong here as this fdunction worked perfectly before the crash and I just cannot see the problem.
Appreciate your assistance.
Many thanks
David
I had an unexpected shutdown of my laptop which has caused some major issues with my application, particularly my functions that use Dsum.
Following is an example of my code that is producing a result but not the correct one!
Public Function ThisMonthWeekdays()
Dim StartDate As Date
Dim EndDate As Date
StartDate = DateSerial(Year(Date), Month(Date), 1)
EndDate = DateSerial(Year(Date), Month(Date) + 1, 0)
ThisMonthWeekdays = DSum("[TotalSales]", "QryYTDSales", "[Event] = No And [date1] BETWEEN #" & StartDate & "# AND #" & EndDate & "#")
End Function
Is there something wrong here as this fdunction worked perfectly before the crash and I just cannot see the problem.
Appreciate your assistance.
Many thanks
David