That opens the door to all sorts of religious manipulation and guilt trips. The existence of moral codes is a major contributor to guilt. A moral code is basically a set of fixed rules that somebody in some position of authority has established, presumably to simplify things for subjects with less of an overview, to ensure that they do sensible things. A moral code, if created with good intentions, is typically a set of simple rules for behavior that on the average would be deemed to best enhance people's lives. Created with less good intentions, the idea is to control people by having them go out of their way to live up to arbitrary limiting rules.
Moral codes are fixed ideas.
They can never work under all circumstances. They are ways of not looking, not dealing with things, not taking one's own decisions. A member of a group would typically commit to following the moral code of that group. It might or might not be written down. It might for that matter just be that individual's implicit idea of how one is supposed to behave.