Howdy. I'm trying to set date criteria in a query based on the day of the week. On wed-fri I only need one date value in the criteria, which works fine. On tuesdays, however I need the previous thursday and friday to be criteria. I'm currently calling a function in the criteria box on the query grid.
Here's that function..
Public Function dayselect()
Dim crun
crun = Format(Now(), "ddd")
If crun = "Tue" Then
dayselect = ((date - 5) Or (date - 4))
Else
dayselect = [Forms]![manageSales]![StartDate]
End If
End Function
StartDate is set with the onClick event that launches the query.
How can I modify the syntax of the function so that the criteria returned for tuesday is date1 OR date2.
Thanks so much.
-shane.
Here's that function..
Public Function dayselect()
Dim crun
crun = Format(Now(), "ddd")
If crun = "Tue" Then
dayselect = ((date - 5) Or (date - 4))
Else
dayselect = [Forms]![manageSales]![StartDate]
End If
End Function
StartDate is set with the onClick event that launches the query.
How can I modify the syntax of the function so that the criteria returned for tuesday is date1 OR date2.
Thanks so much.
-shane.