I [currently] don't have access to my EVTM, but if I remember correctly, the keypad buttons use one common ground circuit and individual circuits for power from the Keyless Entry module.
If the "79" lock all doors function works, and the keyless entry code only contains 7s and 9s in the five-digit code but the keyless code does not work - then the Keyless Entry module has failed.
If the "79" lock all doors function works, but the keyless code contains a 1, 3, or 5 in the five-digit code - then it's possible that at least one of those buttons or button circuits has failed, or the module is at fault.
If the "79" lock all doors function does *not* work, and the keyless code contains a 7, or 9 in the five-digit code - it's possible that one of those buttons (or the circuit) has failed.
If you have already tried a second *known working* module and it does not correct the situation, the problem is likely tied to the keypad or one of the keypad button's circuits. While the keypad is not the easiest thing to change, you can try a known working keypad to test the harness circuits to the module.
The harness wire-leads from the keypad are routed along the aft section of the door, with an 8-wire harness connector to the driver's door harness near the door handle. Remove the door panel, locate the connector and plug-in the known working keypad (be careful, as the two small locking tabs break-off quite easily). If the keypad works, the keypad was at fault; if it does not, you have either an open circuit-fault or failed module.