MohammedAli,
As far as I know, this is not possible using a macro. I think you will
need to use a VBA procedure. There is an example at
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Signature
Steve Schapel, Microsoft Access MVP
> how can disable the bypass key by writing a macro ?