The fact that everything is functional using the remote control, and that both door switches unlock all the doors but don't lock any, narrows down the possibilities.
The switches control the lock/unlock by grounding a particular terminal (one for lock, another for unlock) at the keyless entry module connector. (The remote system doesn't use this same wiring.) Because the switches work for unlock, we know that both switches are probably good, and their common grounds are good (otherwise they wouldn't work to unlock either).
That points to two ideas. The first is that both switches have failed on the lock side only. Not likely, but not impossible. (The spray cleaner idea might help with this.
The other is that there's a bad connection in the "lock" wiring between the switches and the module. It could be just a bad contact at the connector itself.
Perhaps start by locating the module and removing and reattaching the connector(s). If that doesn't work, then, with the connector off, measure the resistance between the "lock" wire and ground. It should be open circuit when the switches are in the neutral position, and close to zero when they are in the "lock" position.
Let us know what your equipped to do.