ahhhm...wait-wait..
How about a
barcode scanner, linked to a (redundant) PC, linked in the LAN? Bare with me...
You could write a little piece of software that receives the scanned badge (that has a barcode), this software could make a connect/request to/with a database and compare the entered barcode with what is in the database, upon success/access, the PC could trigger an electrical lock on the door...
Hint?
Possibility?
Did that, but not for a door, but for a puch clock.
Just some lazy afternoon thoughts...
Thor
Edit - not to put a damper on the enthousiasm here, but a program alone (as you asked) will not do. Access control goes far further than the simple badge-n-software...