Right, i have a tested way of doing it -with a little help of ItsMe's code.
Code:
Private Sub ctrlDeparture_AfterUpdate()
Dim ctrlArrival As Date
Dim ctrlDeparture As Date
Dim strSQL As String
strSQL = "SELECT Arrival, Departure FROM Bookings_tbl " _
& "WHERE [Arrival] BETWEEN #" & Me.ctrlArrival & "# AND #" & Me.ctrlDeparture & "#" _
& "OR [Departure] BETWEEN #" & Me.ctrlArrival & "# AND #" & Me.ctrlDeparture & "#"
With CurrentDb.OpenRecordset(strSQL)
If .RecordCount > 0 Then
MsgBox "Not available"
Else
MsgBox "available"
End If
End With
Set rst = Nothing
End Sub
But allthough this is a beginning, its not the way to do it.
You need a way to filter your records, and some unbound textboxes to check the availability.
But first test my piece of code and let me know how that works out.