My earlier posting on this topic explained that the expression goes into the
Control Source. In that same posting I explained Default Value, and why it
isn't what you want. I also mentioned that the expression could be used in
an Event Procedure. I will say that I had misunderstood that Date is a
field (or control), but if you surround Date with square brackets you should
be OK, even though it is not a recommended procedure to use the name of a
function for a field name. It can cause problems with code, among other
things. That is why John mentioned it. You can use Default Value to set
the value of the Date field to today's date, assuming that you are storing
the information.
J Man said:
Hi John,
Thanx for your post. I can change the field/control name from date to
something else, but in reality I only need it to add value[How Many Days]
to
the current date. But just in case I ever need it to add to the
value[Date]
I guess I will change the name. However I did try to use your formula and
still am having no luck. Just to be clear should I be using this formula
in
the 'default value' or somewhere else? Thanx for your time. Usually with
a
little work at it I can get these to work, but I've been trying to figure
this out for sometime and nothing is working. I'm sure its an easy fix,
but
I'm just not getting it.
Once again thanx
Jerry
John W. Vinson said:
On Tue, 18 Sep 2007 02:08:06 -0700, J Man <J
(e-mail address removed)>
wrote:
I have made a form in which I input different values. On of the values
is
(How Many Days). Now I need to a assign a default value, or expression
(not
sure which way to go about this) that will take the date value for
(Date) and
add the value (How Many Days)
I figured that the formula should read =sum([Date]+[How Many Days])
But that is not giving me any results, thanx for your help in advance
Use DateAdd:
=DateAdd("d", [How Many Days], [Date])
Note that Date is a reserved word for the built in "today's date"
function,
and that you should not use it as a field or controlname.
John W. Vinson [MVP]