Start Date + 7

S

Sonya

I have a report that I want to have list all the Mondays of the month on one
report and the Tuesdays on the next report. I added an unbound control
Start Date on my report and tried start date + 7 on another control, but that
didn't work. How do I do this? Thanks for your help..

example for just Friday's of the month:

11/7/08 11/14/08 11/21/08 11/28/08
Staff
 
S

Stefan Hoffmann

hi Sonya,
I have a report that I want to have list all the Mondays of the month on one
report and the Tuesdays on the next report. I added an unbound control
Start Date on my report and tried start date + 7 on another control, but that
didn't work.
Filter your data with Weekday(), Month() and Year(), e.g.

SELECT *
FROM yourTable
WHERE Weekday(dateField) = 2
AND Month(dateField) = 11
AND Year(dateField) = 2008

Use this query to built a crosstab query.

Take a closer look at the OH to Weekday() as I'm not sure at the moment,
if 2 is the correct value for Mondays.


mfG
--> stefan <--
 
B

BruceM

I would try a grouping level (View >> Sorting and Grouping) with a group
header and something like this as the grouping expression (substitute your
actual field name for [DateField]):
=DatePart("w",[DateField])
In a text box in the group header you could have as the Control Source:
=Format([DateField],"dddd")

You may be ble to group on the Format expression, but I'm not sure that
would sort correctly. It may sort in alphabetical order, while DatePart
will return a number (Sunday is 1).

You could also add the grouping expression to the report's Record Source
query, and group on that calculated field rather than on the expression.
That is, in a blank column in query design view:
DayOrder: DatePart("w",[DateField])

Then select DayOrder as the Sorting and Grouping field.
 
S

Sonya

The problem is I don't have a field with the date. It is for a employee call
in report. And our personnel office wants the report to show each week day
for the month on a separte report and they will check off in the square if
they called the employye or not on that specific day. I know confusing, but
all help is appreciated.

11/7/08 11/14/08 11/21/08 11/28/08
Staff X X

and then the next month would read:

12/5/08 12/12/08 12/19/08 12/26/08
Staff X


BruceM said:
I would try a grouping level (View >> Sorting and Grouping) with a group
header and something like this as the grouping expression (substitute your
actual field name for [DateField]):
=DatePart("w",[DateField])
In a text box in the group header you could have as the Control Source:
=Format([DateField],"dddd")

You may be ble to group on the Format expression, but I'm not sure that
would sort correctly. It may sort in alphabetical order, while DatePart
will return a number (Sunday is 1).

You could also add the grouping expression to the report's Record Source
query, and group on that calculated field rather than on the expression.
That is, in a blank column in query design view:
DayOrder: DatePart("w",[DateField])

Then select DayOrder as the Sorting and Grouping field.

Sonya said:
I have a report that I want to have list all the Mondays of the month on
one
report and the Tuesdays on the next report. I added an unbound control
Start Date on my report and tried start date + 7 on another control, but
that
didn't work. How do I do this? Thanks for your help..

example for just Friday's of the month:

11/7/08 11/14/08 11/21/08 11/28/08
Staff
 
S

Stefan Hoffmann

hi Sonya,
The problem is I don't have a field with the date. It is for a employee call
in report. And our personnel office wants the report to show each week day
for the month on a separte report and they will check off in the square if
they called the employye or not on that specific day. I know confusing, but
all help is appreciated.

11/7/08 11/14/08 11/21/08 11/28/08
Staff X X
You need a calendar table for filtering that days. Then you can join it
with your real data. Create a cosstab based on that JOIN.


mfG
--> stefan <--
 
B

BruceM

In addition to what Stefan said, note that you cannot use a report to enter
data. That can happen only in a form. A report is for viewing data only.

Sonya said:
The problem is I don't have a field with the date. It is for a employee
call
in report. And our personnel office wants the report to show each week
day
for the month on a separte report and they will check off in the square if
they called the employye or not on that specific day. I know confusing,
but
all help is appreciated.

11/7/08 11/14/08 11/21/08 11/28/08
Staff X X

and then the next month would read:

12/5/08 12/12/08 12/19/08 12/26/08
Staff X


BruceM said:
I would try a grouping level (View >> Sorting and Grouping) with a group
header and something like this as the grouping expression (substitute
your
actual field name for [DateField]):
=DatePart("w",[DateField])
In a text box in the group header you could have as the Control Source:
=Format([DateField],"dddd")

You may be ble to group on the Format expression, but I'm not sure that
would sort correctly. It may sort in alphabetical order, while DatePart
will return a number (Sunday is 1).

You could also add the grouping expression to the report's Record Source
query, and group on that calculated field rather than on the expression.
That is, in a blank column in query design view:
DayOrder: DatePart("w",[DateField])

Then select DayOrder as the Sorting and Grouping field.

Sonya said:
I have a report that I want to have list all the Mondays of the month on
one
report and the Tuesdays on the next report. I added an unbound
control
Start Date on my report and tried start date + 7 on another control,
but
that
didn't work. How do I do this? Thanks for your help..

example for just Friday's of the month:

11/7/08 11/14/08 11/21/08 11/28/08
Staff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top