Ok I got it...
Private Sub Form_Open(Cancel As Integer)
Dim RegObj, RegKey
Set RegObj = CreateObject("WScript.Shell")
RegKey = RegObj.RegRead("HKLM\Software\My application\Security Code")
If RegKey = 0 Then DoCmd.Quit
End Sub
But Now I receive a Debug Windowif the registry key are not...