R
reidarT
I have a Booking query with an arrivaldate and a departuredate.
ArrivalDate 18.01.06
DepartureDate 08.09.06
Records from table tblHot
ID HotID FromDate ToDate Price
1 1 01.01.06 08.01.06 2
2 1 09.01.06 20.01.06 3
3 1 21.01.06 27.03.06 5
4 1 28.03.06 30.04.06 3
5 1 01.05.06 31.12.06 2
6 2 02.01.06 31.12.06 7
Dim sqlDates as string
sqlDates = _
"SELECT HotID, FromDate, ToDate, Price " & _
"FROM tblHot " & _
"WHERE tblHot.HotID=1 AND tblHot.FromDate Between #1/18/2006# And
#9/8/2006# " & _
"OR tblHot.HotID=1 AND tblHot.ToDate Between #1/18/2006# And #9/8/2006#
" & _
"ORDER BY tblHot.FromDate"
When I run this query I get 0 records
as result.
The language is Norwegian.
I want a list with 4 records listed, but I get 0
The dates #1/18/2006# And #9/8/2006# are actually from a form with 2 fields
reidarT
ArrivalDate 18.01.06
DepartureDate 08.09.06
Records from table tblHot
ID HotID FromDate ToDate Price
1 1 01.01.06 08.01.06 2
2 1 09.01.06 20.01.06 3
3 1 21.01.06 27.03.06 5
4 1 28.03.06 30.04.06 3
5 1 01.05.06 31.12.06 2
6 2 02.01.06 31.12.06 7
Dim sqlDates as string
sqlDates = _
"SELECT HotID, FromDate, ToDate, Price " & _
"FROM tblHot " & _
"WHERE tblHot.HotID=1 AND tblHot.FromDate Between #1/18/2006# And
#9/8/2006# " & _
"OR tblHot.HotID=1 AND tblHot.ToDate Between #1/18/2006# And #9/8/2006#
" & _
"ORDER BY tblHot.FromDate"
When I run this query I get 0 records
as result.
The language is Norwegian.
I want a list with 4 records listed, but I get 0
The dates #1/18/2006# And #9/8/2006# are actually from a form with 2 fields
reidarT