projecting a finish date for a project?

  • Thread starter Thread starter efandango
  • Start date Start date
E

efandango

I want to work out the expected Finish date of a project based on taking
todays date and subracting it against a finite number of days for the project
(290), using the current record's Run No as the subracting factor.

So for example:

[TodaysDate]: 29/03/2009
[Run_No]: 61
ProjectTotalDays: 290
number of days to complete =229
[DatetoComplete]: ?


How would I go about doing this?
 
On Sun, 29 Mar 2009 08:49:01 -0700, efandango

Use the DateAdd function to do date math.
=DateAdd("d", TodaysDate, ProjectTotalDays - Run_No)

-Tom.
Microsoft Access MVP
 
Tom,

I have:

On subform:

Field Name Control Source Format
txt_TodaysDate TodaysDate Long Date
txt_Expected_Date =DateAdd("d","txt_TodaysDate","txt_ProjectTotalDays -
Forms![frm_Runs]![Run_No]") Long Date
txt_ProjectTotalDays Unbound General Number

On Main Form
Run_No Forms![frm_Runs]![Run_No]

I get Error# in the 'txt_Expected_Date' field

what am I doing wrong?




Tom van Stiphout said:
On Sun, 29 Mar 2009 08:49:01 -0700, efandango

Use the DateAdd function to do date math.
=DateAdd("d", TodaysDate, ProjectTotalDays - Run_No)

-Tom.
Microsoft Access MVP

I want to work out the expected Finish date of a project based on taking
todays date and subracting it against a finite number of days for the project
(290), using the current record's Run No as the subracting factor.

So for example:

[TodaysDate]: 29/03/2009
[Run_No]: 61
ProjectTotalDays: 290
number of days to complete =229
[DatetoComplete]: ?


How would I go about doing this?
 
Tom, (hopefully this is a clearer version than my scrambled previous message)

I have:

On subform:

Field Name txt_TodaysDate
Control Source TodaysDate
Format Long Date

Field Name txt_Expected_Date
Control Source =DateAdd("d","txt_TodaysDate","txt_ProjectTotalDays -
Forms![frm_Runs]![Run_No]")
Format Long Date


Field Name txt_ProjectTotalDays
Control Source Unbound
Format General Number

On Main Form
Field Name Run_No
Control Source Forms![frm_Runs]![Run_No]

I get Error# in the 'txt_Expected_Date' field

what am I doing wrong?




Tom van Stiphout said:
On Sun, 29 Mar 2009 08:49:01 -0700, efandango

Use the DateAdd function to do date math.
=DateAdd("d", TodaysDate, ProjectTotalDays - Run_No)

-Tom.
Microsoft Access MVP

I want to work out the expected Finish date of a project based on taking
todays date and subracting it against a finite number of days for the project
(290), using the current record's Run No as the subracting factor.

So for example:

[TodaysDate]: 29/03/2009
[Run_No]: 61
ProjectTotalDays: 290
number of days to complete =229
[DatetoComplete]: ?


How would I go about doing this?
 
On Sun, 29 Mar 2009 15:37:01 -0700, efandango

Try this:
=DateAdd("d",txt_TodaysDate,txt_ProjectTotalDays -
Forms![frm_Runs]![Run_No])

-Tom.
Microsoft Access MVP

Tom, (hopefully this is a clearer version than my scrambled previous message)

I have:

On subform:

Field Name txt_TodaysDate
Control Source TodaysDate
Format Long Date

Field Name txt_Expected_Date
Control Source =DateAdd("d","txt_TodaysDate","txt_ProjectTotalDays -
Forms![frm_Runs]![Run_No]")
Format Long Date


Field Name txt_ProjectTotalDays
Control Source Unbound
Format General Number

On Main Form
Field Name Run_No
Control Source Forms![frm_Runs]![Run_No]

I get Error# in the 'txt_Expected_Date' field

what am I doing wrong?




Tom van Stiphout said:
On Sun, 29 Mar 2009 08:49:01 -0700, efandango

Use the DateAdd function to do date math.
=DateAdd("d", TodaysDate, ProjectTotalDays - Run_No)

-Tom.
Microsoft Access MVP

I want to work out the expected Finish date of a project based on taking
todays date and subracting it against a finite number of days for the project
(290), using the current record's Run No as the subracting factor.

So for example:

[TodaysDate]: 29/03/2009
[Run_No]: 61
ProjectTotalDays: 290
number of days to complete =229
[DatetoComplete]: ?


How would I go about doing this?
 
Tom,

that works beautifully; but I have an oversight error. How can I get the
process/code to ignore weekends for the Expected Date field?





Tom van Stiphout said:
On Sun, 29 Mar 2009 15:37:01 -0700, efandango

Try this:
=DateAdd("d",txt_TodaysDate,txt_ProjectTotalDays -
Forms![frm_Runs]![Run_No])

-Tom.
Microsoft Access MVP

Tom, (hopefully this is a clearer version than my scrambled previous message)

I have:

On subform:

Field Name txt_TodaysDate
Control Source TodaysDate
Format Long Date

Field Name txt_Expected_Date
Control Source =DateAdd("d","txt_TodaysDate","txt_ProjectTotalDays -
Forms![frm_Runs]![Run_No]")
Format Long Date


Field Name txt_ProjectTotalDays
Control Source Unbound
Format General Number

On Main Form
Field Name Run_No
Control Source Forms![frm_Runs]![Run_No]

I get Error# in the 'txt_Expected_Date' field

what am I doing wrong?




Tom van Stiphout said:
On Sun, 29 Mar 2009 08:49:01 -0700, efandango

Use the DateAdd function to do date math.
=DateAdd("d", TodaysDate, ProjectTotalDays - Run_No)

-Tom.
Microsoft Access MVP


I want to work out the expected Finish date of a project based on taking
todays date and subracting it against a finite number of days for the project
(290), using the current record's Run No as the subracting factor.

So for example:

[TodaysDate]: 29/03/2009
[Run_No]: 61
ProjectTotalDays: 290
number of days to complete =229
[DatetoComplete]: ?


How would I go about doing this?
 
Back
Top