Sounds like they owe another day or need to be evicted. I think they would automatically be charged another day. or I suppose they could have left without checking out. But if they come back would be a real problem if they still have a key.
>>Doesn't someone have to pay the bill and hand in a room key?
>>I have tried talking the client out of it, but he wouldn't bulge. He says making the room automatically available after date and time has expired would make the workers at the front office forcefully make the room available physical. His reason doesn't really sit well with me.
I think the unique billno should be used instead of recordno. Everything should be in a transaction. I would think knowing the roomno or billno would have to be passed to the function. I don't see any need for the CASE statement.