B
Brian
I'm trying to do something like the following but keep
getting error messages like type mismatch. What should
this look like?
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "DoCmd.OpenQuery 'QueryAv'"
rs![Booking ID] = varNewID
rs.Update
rs.Close
Set rs = Nothing
QueryAV 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));
getting error messages like type mismatch. What should
this look like?
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "DoCmd.OpenQuery 'QueryAv'"
rs![Booking ID] = varNewID
rs.Update
rs.Close
Set rs = Nothing
QueryAV 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));