B
Brad
Thanks for taking the time to read my question.
I get the error "Too Few Parameters" when I run my query. In my query I
have 2 fields that have criteria on them. I have parameters for these two
fields. I am guessing that the second parameter is causing the problem as it
references 2 different fields.
How do I get around this?
Thanks,
Brad
Code:
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblBooking")
Set qdf = dbs.QueryDefs("qryAddNewBookingPossible")
qdf.Parameters(0).Value =
[Forms]![frmtblBookingAddNew]![BookingRoomBooked]
qdf.Parameters(1).Value = "Between " &
[Forms]![frmtblBookingAddNew]![BookingStartDate] & " And " &
[Forms]![frmtblBookingAddNew]![BookingEndDate] 'Problem Here
I get the error "Too Few Parameters" when I run my query. In my query I
have 2 fields that have criteria on them. I have parameters for these two
fields. I am guessing that the second parameter is causing the problem as it
references 2 different fields.
How do I get around this?
Thanks,
Brad
Code:
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblBooking")
Set qdf = dbs.QueryDefs("qryAddNewBookingPossible")
qdf.Parameters(0).Value =
[Forms]![frmtblBookingAddNew]![BookingRoomBooked]
qdf.Parameters(1).Value = "Between " &
[Forms]![frmtblBookingAddNew]![BookingStartDate] & " And " &
[Forms]![frmtblBookingAddNew]![BookingEndDate] 'Problem Here