G
Guest
I am trying to pull data on a Monday where the entries from the previous day
are extracted from the database, and I setup the query to read "Date()-1" in
the criteria line of my query, and this works for every other day of the
week, but I realized on Monday this simple query won't work, as I need to
pull the information entered on Friday, Saturday and Sunday for Monday's
query.
I asked this question previously and someone said I should use this:
"IIf(Weekday("MyDate",2)<5,"MyDate","MyDate"+(8-Weekday("MyDate",2)))"
But either I'm not adding this correctly to my query, or I'm missing
something, because it gives me a "data type mismatch" error message when I
try to run the query. I'd like to leave my "Date()-1" in the criteria line
because this works for pulling data Tue-Fri from the previous days' entires,
but if that can be worked into the entire criteria I guess that would work as
well. If someone could please help me figure out what I need to type for
this criteria (not SQL) in the query I would be very thankful!
Have a great Monday everyone!
are extracted from the database, and I setup the query to read "Date()-1" in
the criteria line of my query, and this works for every other day of the
week, but I realized on Monday this simple query won't work, as I need to
pull the information entered on Friday, Saturday and Sunday for Monday's
query.
I asked this question previously and someone said I should use this:
"IIf(Weekday("MyDate",2)<5,"MyDate","MyDate"+(8-Weekday("MyDate",2)))"
But either I'm not adding this correctly to my query, or I'm missing
something, because it gives me a "data type mismatch" error message when I
try to run the query. I'd like to leave my "Date()-1" in the criteria line
because this works for pulling data Tue-Fri from the previous days' entires,
but if that can be worked into the entire criteria I guess that would work as
well. If someone could please help me figure out what I need to type for
this criteria (not SQL) in the query I would be very thankful!
Have a great Monday everyone!