I often read or hear about dementia patients leaving their homes and wandering outside and family members have to go searching for them. There is absolutely no excuse for this! All it takes is for the caregiver to call a locksmith, and he will gladly oblige with a dead bolt and several keys, and of course the patient will never have a key; it will not be possible to leave the house. I don't know why all caregiver spouses don't automatically do this before the wandering begins. I have three doors in our house that needed dead bolts, and it cost me just over $700, but it was well worth it because I can sleep peacefully now knowing that there is no way in the world my husband cannot open any of the doors while I'm asleep. He has tried and has asked for a key, and I told him that I did this for his own safety and for my piece of mind. He has finally accepted my decision.
I know what I'm doing! I have already "thought twice about those locks." That's why I had them installed!!!
As for your husband's dementia.... please note there are different stages of dementia and one stage a person could become violent. That is probably what had happened with ba8alou above, and many others have written the same on these forums.
You may want to think twice about those locks.
Laws are made to be broken. I had property I had to get rid of in an adjoining town. The renter skipped off to Mexico, leaving me with hundreds of dollars worth of unpaid bills. I met with my lawyer after three trips back and forth to the sheriff's office in Wheaton, Illinois. It cost me every time I went. The law is that the sheriff has to post a paper on the door I don't know how many times informing the tenant of his rights, etc. etc. blah blah blah.
My attorney told me to forget all this and go in and claim my property and get it ready to put on the market. I said, "But the law....." He said, "The h*ll with the law! Just do it!" So I did, and it sold even before I could get it listed.
Sometimes you have to ignore the law and go with common sense!