How to prevent overbooking rooms?

I am trying to make restriction for new reservation between two dates. For example during Reservation I selected DateIN is 24/12/2013 and DateOUT is 28/12/2013 and selected Room No. and saved the record in database.

Now I want to restrict any reservation between these two dates like there should be restriction to Reserve room. For example DateIN= 26/12/2013 and DateOut= 30/12/2013 because room is already booked till 28/12/2013 so DateIN must be greater than 28/12/2013.

How can I make this restriction using VB.NET and MS Access? I tried this code but it fails in some conditions.

If the room is already booked from before the new in date until after the new out date then your BETWEEN clause will not detect them. I assume that someone can check in the same day as some else checks out. Test like this