Avoiding start up form!

chip_zli

Access/VBA novice
Local time
Today, 06:55
Joined
Aug 5, 2004
Messages
9
Hello!

I have a really stupid problem. I wrote VBA program in access with 1 switchboard, some forms and used Tools/Startup ... to start switchboard
when .mdb file is loaded. I cleared all check-boxes in Startup dialog . Now I
need to make some changes and I can't access anything but "compiled"
program. So, hoping this is just moron protection (and I feel like one now=),
how can I remove activation of switchboard???


thx in advance!!
 
Hold down [SHIFT] while you attempt to open the database.
 
if you disabled the shift key too, make a search on the forum, because once i came across a sample database where you give it the path of your database and it will enable/disable the shift key bypass.
 
maxmangion said:
if you disabled the shift key too, make a search on the forum, because once i came across a sample database where you give it the path of your database and it will enable/disable the shift key bypass.

Try this function, except replace the CurrentDB to the db you want to re-enable the shift key

Public Function ap_EnableShift()
'This function will enable the shift key at startup causing
'the Autoexec macro and Startup properties to be bypassed
'if the user holds down the shift key when opening the database.

On Error GoTo errEnableShift

Dim db As Database
Dim prop As Property
Const conPropNotFound = 3270

Set db = CurrentDb()

'This next line enables the shift key on startup.
db.Properties("AllowByPassKey") = True

'function successful
Exit Function

errEnableShift:
'The first part of this error routine creates the "AllowByPassKey
'property if it does not exist.
If Err = conPropNotFound Then
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, True)
db.Properties.Append prop
Resume Next
Else
MsgBox "Function 'ap_DisableShift' did not complete successfully."
Exit Function
End If

End Function
 
here is the link to the thread where you can find the sample db which i told you about.

Credits should go to the author of that sample.
 

Users who are viewing this thread

Back
Top Bottom