I need to add seven days to this date...

  • Thread starter Thread starter Kelvin Beaton
  • Start date Start date
K

Kelvin Beaton

This statement is in an Append query if it matters.

I need to add seven days to this date.
FollowupDate:
Format(DateValue([forms]![frm_GetImportDate]![ImportDate]),"mm/dd/yyyy")

I've tried a number of variations of this and all I get back is a message
saying "This expression is typed incorrectly, or it is too complex to be
evaluated...."

Can someone please help me get this to work?

Thanks

Kelvin
 
FollowupDate:
Format(DateAdd("d", 7,
DateValue([forms]![frm_GetImportDate]![ImportDate])),"mm/dd/yyyy")
 
Kelvin

If I take your description literally, you are trying to store a followup
date. It is rarely necessary to store a calculated value, and there are
some very good reasons not to. If you know that the followup date is always
7 days after your [ImportDate], just use a query to do the calculation on
the fly.

Take a look at the DateAdd() function (Access HELP), or just use
[ImportDate] + 7.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thanks for your comments about storing the date!

I do understand what you are saying.
I'm importing some data and need to enter the date... In this case I believe
it to be a valid reason.

I did look up DateAdd and got it to work!

Thanks!!

Kelvin


Jeff Boyce said:
Kelvin

If I take your description literally, you are trying to store a followup
date. It is rarely necessary to store a calculated value, and there are
some very good reasons not to. If you know that the followup date is
always 7 days after your [ImportDate], just use a query to do the
calculation on the fly.

Take a look at the DateAdd() function (Access HELP), or just use
[ImportDate] + 7.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Kelvin Beaton said:
This statement is in an Append query if it matters.

I need to add seven days to this date.
FollowupDate:
Format(DateValue([forms]![frm_GetImportDate]![ImportDate]),"mm/dd/yyyy")

I've tried a number of variations of this and all I get back is a message
saying "This expression is typed incorrectly, or it is too complex to be
evaluated...."

Can someone please help me get this to work?

Thanks

Kelvin
 
Thanks, you are right about DateAdd, I did look it up and got it to work!

Thanks!!

Kelvin

Douglas J. Steele said:
FollowupDate:
Format(DateAdd("d", 7,
DateValue([forms]![frm_GetImportDate]![ImportDate])),"mm/dd/yyyy")


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Kelvin Beaton said:
This statement is in an Append query if it matters.

I need to add seven days to this date.
FollowupDate:
Format(DateValue([forms]![frm_GetImportDate]![ImportDate]),"mm/dd/yyyy")

I've tried a number of variations of this and all I get back is a message
saying "This expression is typed incorrectly, or it is too complex to be
evaluated...."

Can someone please help me get this to work?

Thanks

Kelvin
 
Kelvin

So, let me try a scenario out on you...

You import some data, including a date. You run your 'add 7' routine and
store the future date.

Then someone notices that the original date was in error (a typo) and
corrects it in the already imported database.

How does the 'future date' get updated?!?

The real determiner of the necessity has more to do with whether the data is
NOT calculable. In your case, it is.

If you used a query to calculate 'future dates' instead, in the scenario
above running the query automatically shows the (newly-calculated) future
date. No problem with synchronization.

Good luck!

Jeff Boyce
Microsoft Office/Access MVP

Kelvin Beaton said:
Thanks for your comments about storing the date!

I do understand what you are saying.
I'm importing some data and need to enter the date... In this case I
believe it to be a valid reason.

I did look up DateAdd and got it to work!

Thanks!!

Kelvin


Jeff Boyce said:
Kelvin

If I take your description literally, you are trying to store a followup
date. It is rarely necessary to store a calculated value, and there are
some very good reasons not to. If you know that the followup date is
always 7 days after your [ImportDate], just use a query to do the
calculation on the fly.

Take a look at the DateAdd() function (Access HELP), or just use
[ImportDate] + 7.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Kelvin Beaton said:
This statement is in an Append query if it matters.

I need to add seven days to this date.
FollowupDate:
Format(DateValue([forms]![frm_GetImportDate]![ImportDate]),"mm/dd/yyyy")

I've tried a number of variations of this and all I get back is a
message saying "This expression is typed incorrectly, or it is too
complex to be evaluated...."

Can someone please help me get this to work?

Thanks

Kelvin
 

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