display date numbers based on input form

M

mpjm

i am trying to get a report to show the dates for a specified starting
date entered on a form (the report is based on the form). the report is
a timesheet/payroll setup that goes for two weeks.

for example, the user enters the starting date as 07/03/2006 and i want
the report to display each day for the following two weeks (Mon-Sun).


to make it clearer i want the report to display two weeks worth of date
numbers (ie. 7/03 - 7/17 Monday - Sunday).

the first date is entered by the user on an input screen and the rest
of the dates are calculated based on the first.


any ideas?
if you need clarification i will provide as necessary.
thanks in advance
 
A

Allen Browne

See:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

The article explains 2 methods with a pair of text boxes for the dates. In
your case, you only need one text box, so could use:
Between [StartDate] And DateAdd("d", 13, [StartDate])
for method 1, or for method 2:
strWhere = strField & " Between " & _
Format(Me.txtStartDate, conDateFormat) & " And " & _
Format(DateAdd("d", 13, Me.txtStartDate), conDateFormat)
 
M

mpjm

thanks for the response - i came across that in my search for some help
and it wasn't what i was looking for.

i want to enter the starting date on a form in an unbound text box
(that works), it shows up on a report in one spot like its supposed to
(that works), and now i want to calculate dates for 2 weeks following
and be places in individual text boxes on a report.

i hope i am being clear because its even hard for me to come up with
the right words! thanks to anyone who can lend a hand.


Allen said:
See:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

The article explains 2 methods with a pair of text boxes for the dates. In
your case, you only need one text box, so could use:
Between [StartDate] And DateAdd("d", 13, [StartDate])
for method 1, or for method 2:
strWhere = strField & " Between " & _
Format(Me.txtStartDate, conDateFormat) & " And " & _
Format(DateAdd("d", 13, Me.txtStartDate), conDateFormat)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

i am trying to get a report to show the dates for a specified starting
date entered on a form (the report is based on the form). the report is
a timesheet/payroll setup that goes for two weeks.

for example, the user enters the starting date as 07/03/2006 and i want
the report to display each day for the following two weeks (Mon-Sun).


to make it clearer i want the report to display two weeks worth of date
numbers (ie. 7/03 - 7/17 Monday - Sunday).

the first date is entered by the user on an input screen and the rest
of the dates are calculated based on the first.


any ideas?
if you need clarification i will provide as necessary.
thanks in advance
 
A

Allen Browne

The dates have to come from somewhere.

Did you want to manually add 14 text boxes, and set their Control Source to:
=[Forms].[frmWhatDate].[txtStartDate]+1
=[Forms].[frmWhatDate].[txtStartDate]+2
and so on?

Or did you want to create a table of dates, and somehow show these in the
report (e.g. in a subreport)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

thanks for the response - i came across that in my search for some help
and it wasn't what i was looking for.

i want to enter the starting date on a form in an unbound text box
(that works), it shows up on a report in one spot like its supposed to
(that works), and now i want to calculate dates for 2 weeks following
and be places in individual text boxes on a report.

i hope i am being clear because its even hard for me to come up with
the right words! thanks to anyone who can lend a hand.


Allen said:
See:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

The article explains 2 methods with a pair of text boxes for the dates.
In
your case, you only need one text box, so could use:
Between [StartDate] And DateAdd("d", 13, [StartDate])
for method 1, or for method 2:
strWhere = strField & " Between " & _
Format(Me.txtStartDate, conDateFormat) & " And " & _
Format(DateAdd("d", 13, Me.txtStartDate), conDateFormat)

i am trying to get a report to show the dates for a specified starting
date entered on a form (the report is based on the form). the report is
a timesheet/payroll setup that goes for two weeks.

for example, the user enters the starting date as 07/03/2006 and i want
the report to display each day for the following two weeks (Mon-Sun).


to make it clearer i want the report to display two weeks worth of date
numbers (ie. 7/03 - 7/17 Monday - Sunday).

the first date is entered by the user on an input screen and the rest
of the dates are calculated based on the first.


any ideas?
if you need clarification i will provide as necessary.
thanks in advance
 
M

mpjm

what i do is enter the date on a form, the date is applied to the
report at the top to show the beginning week, then i wanted to get the
dates for the following two weeks in text boxes on the report. i posted
the same question in another forum and found the answer. i did just
what you were suggesting in the last response with the text boxes and
the control sources.

now i have a formatting question...
do you know a way to get the date to display as something like "07/03",
specifically with the "0" in front of the "3". i have a way to get the
year cut out just by shortening the text box.

thanks


Allen said:
The dates have to come from somewhere.

Did you want to manually add 14 text boxes, and set their Control Source to:
=[Forms].[frmWhatDate].[txtStartDate]+1
=[Forms].[frmWhatDate].[txtStartDate]+2
and so on?

Or did you want to create a table of dates, and somehow show these in the
report (e.g. in a subreport)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

thanks for the response - i came across that in my search for some help
and it wasn't what i was looking for.

i want to enter the starting date on a form in an unbound text box
(that works), it shows up on a report in one spot like its supposed to
(that works), and now i want to calculate dates for 2 weeks following
and be places in individual text boxes on a report.

i hope i am being clear because its even hard for me to come up with
the right words! thanks to anyone who can lend a hand.


Allen said:
See:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

The article explains 2 methods with a pair of text boxes for the dates.
In
your case, you only need one text box, so could use:
Between [StartDate] And DateAdd("d", 13, [StartDate])
for method 1, or for method 2:
strWhere = strField & " Between " & _
Format(Me.txtStartDate, conDateFormat) & " And " & _
Format(DateAdd("d", 13, Me.txtStartDate), conDateFormat)

i am trying to get a report to show the dates for a specified starting
date entered on a form (the report is based on the form). the report is
a timesheet/payroll setup that goes for two weeks.

for example, the user enters the starting date as 07/03/2006 and i want
the report to display each day for the following two weeks (Mon-Sun).


to make it clearer i want the report to display two weeks worth of date
numbers (ie. 7/03 - 7/17 Monday - Sunday).

the first date is entered by the user on an input screen and the rest
of the dates are calculated based on the first.


any ideas?
if you need clarification i will provide as necessary.
thanks in advance
 

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

Top