K
Kate
Tried the following and get the message too few parameters
expected 3. The following statement gets highlighted:
Set rs = db.OpenRecordset("QueryAv")
Any idea? Thanks
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("QueryAv")
If rs![Booking ID] = 1 Then
DoCmd.OpenForm "SINGLE BOOKING DETAIL"
End If
rs.Close : Set rs = Nothing
Set db = Nothing
The SQL is
SELECT AVAILABILITY.BookingDate, AVAILABILITY.Period,
AVAILABILITY.Room, AVAILABILITY.[Day Number], AVAILABILITY.
[Booking ID]
FROM AVAILABILITY
WHERE (((AVAILABILITY.BookingDate)=Forms![SINGLE BOOKING
AVAILABILITY]!BookingDate) And ((AVAILABILITY.Period)
=Forms![SINGLE BOOKING AVAILABILITY]!Combo8) And
((AVAILABILITY.Room)=Forms![SINGLE BOOKING AVAILABILITY]!
Combo10));
expected 3. The following statement gets highlighted:
Set rs = db.OpenRecordset("QueryAv")
Any idea? Thanks
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("QueryAv")
If rs![Booking ID] = 1 Then
DoCmd.OpenForm "SINGLE BOOKING DETAIL"
End If
rs.Close : Set rs = Nothing
Set db = Nothing
The SQL is
SELECT AVAILABILITY.BookingDate, AVAILABILITY.Period,
AVAILABILITY.Room, AVAILABILITY.[Day Number], AVAILABILITY.
[Booking ID]
FROM AVAILABILITY
WHERE (((AVAILABILITY.BookingDate)=Forms![SINGLE BOOKING
AVAILABILITY]!BookingDate) And ((AVAILABILITY.Period)
=Forms![SINGLE BOOKING AVAILABILITY]!Combo8) And
((AVAILABILITY.Room)=Forms![SINGLE BOOKING AVAILABILITY]!
Combo10));