.I am so confused.. how do i calculate my finishing time then?? i added duration into the booking table. The dateadd function still not working
.I am so confused.. how do i calculate my finishing time then?? i added duration into the booking table. The dateadd function still not working
I added field 'duration' into tblbooking but dateadd function was still not working.....
??? In the jpg I posted your Duration and FinishingTime from your database, the values are correct.
In your own words, what is the difference in your tables Booking and Treatment?
If you have a FinishingTime and a StartTime, you can calculate Duration.
The question seems more related to where is this info recorded.
Booking StartTime 10:00 BookingFinishingTime 10:35, so Duration = Finishingtime-StartTime = 35
Treatment StartTime 10:00, treatment Duration 35 do TreatmentFinishingtime = 10:00 +35 =10:35
TreatmentEndTime = 10:35, treatment Duration = 35, so treatment StartTime = 10;35 -35 = 10:00
starttime is 12:00, duration of specific treatment is 30mins so i want to calculate finishing time.. using dateadd
but in the booking form, the finishing time is not calculated....so i just wanna know what my problem was.
Everything else aside...and the points raised by orange are important...as to why your Default Value syntax isn't working, is that when referencing Controls, in the Properties Pane, as you're doing, here, in the Default Value, the names of the Controls have to be delimited using Square Brackets...not Quotation Marks!
Instead of
=DateAdd("n","Duration","StartTime")
you have to use
=DateAdd("n",[Duration],[StartTime])
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007