KenHigg said:I should know this but it's has me stumped at the moment - When I have a form open I can right-click and it let's me go into design view. How do I turn this right-click option off?
Thanks,
KenHigg said:Shane - Thanks for the help but I couldn't get that to work. In fact, I turned all the startup options off and I was still able to right click and go into design view... Any other ideas?
KenHigg said:Cool - That did it. Thanks!
ShaneMan said:Your welcome. Missed ya in the cooler lately.
Shane
KenHigg said:The Brits wore me down....
Do you know if you can monkey with the startup options with code?
'This ensures the user is the programmer needing to disable the Bypass Key
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "Do you want to enable the Bypass Key?" & vbCrLf & vbLf & _
"Please key the password to enable the Bypass Keys."
strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key Password")
If strInput = "YOUR_PASSWORD" Then
SetProperties "AllowBypassKey", dbBoolean, True
SetProperties "AllowSpecialKeys", dbBoolean, True
SetProperties "StartupForm", dbText, "frmSplashScreen"
SetProperties "StartupShowDBWindow", dbBoolean, True
SetProperties "StartupShowStatusBar", dbBoolean, True
SetProperties "AllowBuiltinToolbars", dbBoolean, True
SetProperties "AllowFullMenus", dbBoolean, True
SetProperties "AllowBreakIntoCode", dbBoolean, True
Beep
MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & _
"The bypass key & startup options will be available the next time the database is opened.", _
vbInformation, "Set Startup Properties"
Else
Beep
SetProperties "AllowBypassKey", dbBoolean, False
SetProperties "AllowSpecialKeys", dbBoolean, False
SetProperties "StartupForm", dbText, "frmSplashScreen"
SetProperties "StartupShowDBWindow", dbBoolean, False
SetProperties "StartupShowStatusBar", dbBoolean, False
SetProperties "AllowBuiltinToolbars", dbBoolean, True
SetProperties "AllowFullMenus", dbBoolean, True
SetProperties "AllowBreakIntoCode", dbBoolean, False
MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf & _
"The Bypass Key was disabled." & vbCrLf & vbLf & _
"The bypass key & the startup options will NOT be available the next time the database is opened.", _
vbCritical, "Invalid Password"
Exit Sub
End If
Public Function SetProperties(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
On Error GoTo Err_SetProperties
Dim db As DAO.Database, prp As DAO.Property
Set db = CurrentDb
db.Properties(strPropName) = varPropValue
SetProperties = True
Set db = Nothing
Exit_SetProperties:
Exit Function
Err_SetProperties:
If Err = 3270 Then 'Property not found
Set prp = db.CreateProperty(strPropName, varPropType, varPropValue)
db.Properties.Append prp
Resume Next
Else
SetProperties = False
MsgBox "SetProperties", Err.Number, Err.Description
Resume Exit_SetProperties
End If
End Function
That code looks familiar.wardster said:Code:'This ensures the user is the programmer needing to disable the Bypass Key ...yada yada yada...
Check this link out on how to do it with a lot of code... Disable Shift Keywardster said:Hi - apologies if that is your code ghudson - i know i found it somewhere on this forum and couldnt remember who or where it was to credit the author.
Does anyone know if it is possible to add a password mask when typing in the password rather than it being in readable text?
Kind Regards,
Ian