G
Guest
I want to find number of days between two dates form Table Holiday with
condition from TblVac (StartVac and StopVac field)
One field in query I type
Vacationdays
Count("Dayoff","Holiday","Holiday.Dayoff between #" &
(TblVac.StartVac]) & "# and #" & ([TblVac.StopVac]) & "#"))
When I run this query, No any error message, Other fields work OK, but
result in vacation days is "0" all record Why?
After that I try to create form (testform) and then write code
Vacationdays= DCount("Dayoff","Holiday","Holiday.Dayoff between
Forms!Testform.StartVac and Forms!Testform.StopVac")
It works, I don't understand
condition from TblVac (StartVac and StopVac field)
One field in query I type
Vacationdays

(TblVac.StartVac]) & "# and #" & ([TblVac.StopVac]) & "#"))
When I run this query, No any error message, Other fields work OK, but
result in vacation days is "0" all record Why?
After that I try to create form (testform) and then write code
Vacationdays= DCount("Dayoff","Holiday","Holiday.Dayoff between
Forms!Testform.StartVac and Forms!Testform.StopVac")
It works, I don't understand