DateAdd Question

bennybee

Registered User.
Local time
Today, 00:23
Joined
Jan 13, 2004
Messages
50
I have 3 fields.
one is a date field - Date
the second is a number field - Number_Days
the third - Finishing_Date.

when the user enters the starting date (Date), and the length of the meeting (Number_Days), i want the finishing date to be auto. calculated.

i tried making a query with this as the criteria for the Finishing_Date.:

=DateAdd("d",[Number_Days],[Date])

but it just gives me a blank result, rather than calculating the finishing date for each entry already made.

how can i fix this?
 
benny,

You can't set something to a criteria. FinishDate will
never equal what that calculation represents.

You want a column named FinishDate in the query:

FinishDate: DateAdd("d",[Number_Days], [TheDate])

That should do it. I changed Date to TheDate because
it's a reserved word.

FinishDate is not stored in your table, which is good.

Wayne
 
yep that works well.. and it stores the value so that i can use it later..
thanks
 

Users who are viewing this thread

Back
Top Bottom