G
Guest
Can anyone help me with this one
I have a form with a button to check if any booking details clash [btnBook], this is the code behind the button
If IsNull(DLookup("[Aircraft]", "BookingDetails", "([Aircraft] = " & cboAircraft & " AND [HireDate] = #" &
cboHireDate & "#) AND ((#" & cboStartTime & "# BETWEEN [StartTime] AND [EndTime]) AND (#" &
cboEndTime & "# BETWEEN [StartTime} AND [EndTime]))")) The
txtConfirm.Text = "Your booking is confirmed" ' Dlookup returns Null = No record foun
Els
txtConfirm.Text = "Please Choose another Aircraft, Date, Time" 'DLookup found a record
End I
End Su
My problem is at runtime i get the following error message under run time error '3075
Between operator without AND in query expression '([Aircraft] = G-BGIG AND [HireDate] = #17/03/2004#) AND
((#08:00:00# BETWEEN [StartTIme] AND [EndTime]) AND (#10:00:00# BETWEEN [StartTime] AND [EndTime]))
Am i missing an AND or an operator - i can't figure it out
Any ideas....anyone?
Thanks in advanc
I have a form with a button to check if any booking details clash [btnBook], this is the code behind the button
If IsNull(DLookup("[Aircraft]", "BookingDetails", "([Aircraft] = " & cboAircraft & " AND [HireDate] = #" &
cboHireDate & "#) AND ((#" & cboStartTime & "# BETWEEN [StartTime] AND [EndTime]) AND (#" &
cboEndTime & "# BETWEEN [StartTime} AND [EndTime]))")) The
txtConfirm.Text = "Your booking is confirmed" ' Dlookup returns Null = No record foun
Els
txtConfirm.Text = "Please Choose another Aircraft, Date, Time" 'DLookup found a record
End I
End Su
My problem is at runtime i get the following error message under run time error '3075
Between operator without AND in query expression '([Aircraft] = G-BGIG AND [HireDate] = #17/03/2004#) AND
((#08:00:00# BETWEEN [StartTIme] AND [EndTime]) AND (#10:00:00# BETWEEN [StartTime] AND [EndTime]))
Am i missing an AND or an operator - i can't figure it out
Any ideas....anyone?
Thanks in advanc