In (x,y,z) question
-
- BronzeLounger
- Posts: 1463
- Joined: 08 Jul 2016, 18:53
In (x,y,z) question
I have a field that is date/Time format. For a given set of Days could be grouped by filling in the interior with the dates desired, but this is a manual operation. Is there a form which would allow a current week dates to be included, whatever the week may be just the current week?
-
- Administrator
- Posts: 78794
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: In (x,y,z) question
You might create a rule of type Expression Is with formula
[DateField]>=Date()-Weekday(Date())+1 And [DateField]<Date()-WeekDay(Date())+8
[DateField]>=Date()-Weekday(Date())+1 And [DateField]<Date()-WeekDay(Date())+8
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1463
- Joined: 08 Jul 2016, 18:53
Re: In (x,y,z) question
In a criteria line?
-
- Administrator
- Posts: 78794
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: In (x,y,z) question
I thought you wanted to create a conditional formatting rule.
If you want to return only records for the current week in a query, set the Criteria for the date/time field to
>=Date()-Weekday(Date())+1 And <Date()-WeekDay(Date())+8
If you want to return only records for the current week in a query, set the Criteria for the date/time field to
>=Date()-Weekday(Date())+1 And <Date()-WeekDay(Date())+8
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1463
- Joined: 08 Jul 2016, 18:53
Re: In (x,y,z) question
Works for today, thanks.
-
- BronzeLounger
- Posts: 1463
- Joined: 08 Jul 2016, 18:53
Re: In (x,y,z) question
Well, I spoke one day too soon.
Image of query that works displays 2 records 5/20 and 5/21. Second image is of form with query as recordset, this doesn't work. I get only one return record with #Name? for the first field. Any ideas?
Image of query that works displays 2 records 5/20 and 5/21. Second image is of form with query as recordset, this doesn't work. I get only one return record with #Name? for the first field. Any ideas?
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78794
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- BronzeLounger
- Posts: 1463
- Joined: 08 Jul 2016, 18:53
Re: In (x,y,z) question
You always say that with a smile.
-
- Administrator
- Posts: 78794
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: In (x,y,z) question
This is what I see when I open the form:
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1463
- Joined: 08 Jul 2016, 18:53
Re: In (x,y,z) question
I see that also when I re-opened. It did as I described, so why the change after closing and re-opening?
-
- Administrator
- Posts: 78794
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: In (x,y,z) question
Perhaps the query had to be run again. Otherwise, I wouldn't know.
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1463
- Joined: 08 Jul 2016, 18:53
Re: In (x,y,z) question
I don't know either.