Automatically add a date

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

Guest

Hi

I am new to Access and am having trouble with getting a date to
automatically enter into a certain field.

I have a form onto which I enter information regarding a customer. One of
the fields is the [date of order:] and another is [3 week follow up due on:]

What I want to happen is the [3 week follow up due on:] field be completed
automatically with a date that is 3 weeks after the date I enter in the [date
of order] field.

Is this possible?

Many thanks in advance
 
Hi

I am new to Access and am having trouble with getting a date to
automatically enter into a certain field.

I have a form onto which I enter information regarding a customer. One of
the fields is the [date of order:] and another is [3 week follow up due on:]

What I want to happen is the [3 week follow up due on:] field be completed
automatically with a date that is 3 weeks after the date I enter in the [date
of order] field.

Is this possible?

Many thanks in advance


Add an unbound control to your form (or report).
Set it's control source to:
=DateAdd("ww",3,[OrderDate])

There is no need to store the [follow up] value.
As long as you have the order date stored, any time you need the
follow up data, compute it as above.
 
Can it be done? Yes. Should it be done? No. You should almost never store
derived data in a table. If the rule is that the second date is always three
weeks after the first, you should calculated the second date each time that
you need to see it in a form, report, or query.

In that case delete the [3 week follow up due on:] field from the table.
Then change the control source for the existing [3 week follow up due on:]
text box on a form to =[date of order] + 21 .

For the above to work the [date of order] field MUST be a Date/Time datatype
in the table.
 

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