I have a room reservation system where you can select the room and the time you use the room. The time is dived into morning, afternoon and the whole day. I did this by using DAUERID with 1 (morning), 2(afternoon) and 3(day) values.
Now the problem is that if the whole day is already taken and another customer want's to book the room only for the morning, I have the DAUERID = 1 from the form that has to be validated against a DAUERID of 1 in the reservation table but also for a DAUERID of 3 in the reservation table.
So what I did is this CASE szenario to generate a value (0 or 1) for "result" that helps me to validate available entries in the reservation table. But if there is no reservation for that day in the reservation atble, the recordset returns empty and therefore no 0/1 values.
What I need is a validation like "if return is 0 OR the recordset is empty, accept booking".