Calculating due dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On a form I would like to show three due dates for a plan based on the date
the record is created and criteria selected in a fourth field.

So:

Assign: X days ##/##/####
Plan Due +X days ##/##/####
Completion +XX days ##/##/####

The number of days for each will vary depending on the priority level
selected.

Appreciate the help.
 
On a form I would like to show three due dates for a plan based on the date
the record is created and criteria selected in a fourth field.

So:

Assign: X days ##/##/####
Plan Due +X days ##/##/####
Completion +XX days ##/##/####

The number of days for each will vary depending on the priority level
selected.

Appreciate the help.

Are you storing the record-created date? What do you mean by "X days"
vs. "+X Days" or "+XX days"? Where are X and XX coming from?

You can set the Control Source of a textbox to

=DateAdd("d", [NumberOfDays], [DateTimeValue])

to dynamically calculate one date based on another date... is that
what you had in mind?

John W. Vinson[MVP]
 
In you r expression: =DateAdd("d", [NumberOfDays], [DateTimeValue])

Can I base the "NumberofDays" on one field and "DateTimeValue" on another?

Also, I have added similar fields to my table and query but they won't show
in the ControlSource drop down list.

Any hints?

Thanks.

John Vinson said:
On a form I would like to show three due dates for a plan based on the date
the record is created and criteria selected in a fourth field.

So:

Assign: X days ##/##/####
Plan Due +X days ##/##/####
Completion +XX days ##/##/####

The number of days for each will vary depending on the priority level
selected.

Appreciate the help.

Are you storing the record-created date? What do you mean by "X days"
vs. "+X Days" or "+XX days"? Where are X and XX coming from?

You can set the Control Source of a textbox to

=DateAdd("d", [NumberOfDays], [DateTimeValue])

to dynamically calculate one date based on another date... is that
what you had in mind?

John W. Vinson[MVP]
 
In you r expression: =DateAdd("d", [NumberOfDays], [DateTimeValue])

Can I base the "NumberofDays" on one field and "DateTimeValue" on another?

If you're doing this on a Form (you HAVEN'T SAID, and my telepathy is
on the blink today) then yes, you can use a Control Name for each of
these.

If you're doing it in a Query, then yes, you can use a FIeldname.
Also, I have added similar fields to my table and query but they won't show
in the ControlSource drop down list.

You cannot create such a calculated field in a Table; you can do so in
a Query by typing the expression in a vacant Field cell. If you type a
fieldname followed by a colon in front, it will use that fieldname:

DateDue: DateAdd("d", [NumberOfDaysField], [DateTimeField])

using fieldname that exist in the query. NumberOfDaysField should be a
Number datatype field, DateTimeField a Date/Time type field.

John W. Vinson[MVP]
 

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

Back
Top