Design view... (1 Viewer)

KenHigg

Registered User
Local time
Today, 16:04
Joined
Jun 9, 2004
Messages
13,327
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,
 

ShaneMan

Registered User.
Local time
Today, 13:04
Joined
May 9, 2005
Messages
1,224
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,

Hey Ken,

Go to Tools>Startup and I think it's the Default Shortcuts, unclick it. If that's not the one then it's one of them.;) I think that's what your looking for. Hope it is.

HTH,
Shane
 

KenHigg

Registered User
Local time
Today, 16:04
Joined
Jun 9, 2004
Messages
13,327
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?
 

ShaneMan

Registered User.
Local time
Today, 13:04
Joined
May 9, 2005
Messages
1,224
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?

Hey Ken,

Did you close the db and then reopen (without using the shift bypass)? If you didn't then you will need to and I think you'll have what you want after that.

HTH,
Shane
 

KenHigg

Registered User
Local time
Today, 16:04
Joined
Jun 9, 2004
Messages
13,327
ShaneMan said:
Your welcome. Missed ya in the cooler lately.

Shane

:D The Brits wore me down....;)

Do you know if you can monkey with the startup options with code?
 

ShaneMan

Registered User.
Local time
Today, 13:04
Joined
May 9, 2005
Messages
1,224
KenHigg said:
:D The Brits wore me down....;)

Do you know if you can monkey with the startup options with code?

Don't know if there are other ways than this but follow these links and I think it will give you the general idea and from there will probably help you in how to search for an answer. I have not done it myself (except just playing around with the code) but I have seen the question asked a number of times so I think you should be able to come up with some code to do what your asking. If you don't, let me know and I'll see what I can find for ya.

HTH,
Shane

http://www.utteraccess.com/forums/showflat.php?Cat=&Board=91&Number=495042&fpart=
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acstartupoptions.asp

P.S. I understand the Brits wearing you down thing. I've kinda stayed away for a while now myself. Reasoning with them is impossible. Kinda of like wiping your butt on a bicycle tire....there's no end to it. :D
 
Last edited:

KeithG

AWF VIP
Local time
Today, 13:04
Joined
Mar 23, 2006
Messages
2,592
Yeah you can set the start up properties via code. They are properties of a DAO Database object. You will have to first create the property then set its value.
 

ChrisO

Registered User.
Local time
Tomorrow, 06:04
Joined
Apr 30, 2003
Messages
3,202
The startup properties can be set in code but it is sometimes beneficial to do so under some condition at runtime.

Attached is a small demo that changes the startup properties depending on if the database is an MDB or MDE. For want of a better method, the code attempts to open a module and that will fail in an MDE.

The demo is in A97 and has been tested with A2K as well. It’s a cut-down of a larger database that has also been tested in A2K3. It does not require a reference to DAO.

To test it, first convert it to your version of Access. In the converted version you should have ‘standard’ startup properties. Next convert it to an MDE and open the MDE. Some of the startup properties will have changed. Shutdown the MDE and re-open it. All the properties should now have been changed.

The list of properties to be changed is hard coded in a module. They could be shifted to a table but the table would be more ‘exposed’ if someone as really trying hard to break it.

Anyhow, enough waffle from me and hope it helps.

Regards,
Chris.
 

Attachments

  • SetStartupOptionsA97.zip
    26 KB · Views: 122

wardster

Registered User.
Local time
Today, 21:04
Joined
May 25, 2006
Messages
34
The main thing to remember when disabling startup options via code - is that you have a way of re-enabling them

I found and use a piece of code that allows these options to be enabled and disabled by the use of a password... which is a extremly useful, i use the code within the "on click" event on a logo on my switchboard form.
note the startup form i use is "frmSplashScreen"

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

and in addition to the reply below:
create a module with the following : - saved in mine as mdlStartUp
Code:
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


Hope this helps, and all credit goes to the original author

Ian
 
Last edited:

ghudson

Registered User.
Local time
Today, 16:04
Joined
Jun 8, 2002
Messages
6,194
wardster said:
Code:
'This ensures the user is the programmer needing to disable the Bypass Key
...yada yada yada...
That code looks familiar.

There is another step to making it work for you have to "SetProperties". This thread has all that...
How to use Startup form dynamically
 

wardster

Registered User.
Local time
Today, 21:04
Joined
May 25, 2006
Messages
34
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
 

ghudson

Registered User.
Local time
Today, 16:04
Joined
Jun 8, 2002
Messages
6,194
wardster 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
Check this link out on how to do it with a lot of code... Disable Shift Key
 
Last edited:

Users who are viewing this thread

Top Bottom