By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Tools => Startup issues

P: n/a
Hi,

I am having quite a major problem with an access database. Basically,
under "Tools => Startup", there are options to disable the Menu's
(e.g. - file, tools etc), the toolbars, the main window, and in fact,
everything.

A vital database has had everything disabled, and so the menus and
windows no longer load when I open the database. This means I can't
get to the
Tools menu to edit the Startup options and reverse the problem.

Does anybody know of any way to fix this problem, or at least to
access
the tables so that the information can be copied and pasted into a new
database.

The only solution I can guess at, is maybe there are some shortcut
keys that I don't know about....

Any help will be greatfully appreciated!

many thanks,
Stu.

(queries@moon DON'TSPAMME klash.com)
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You programmatically reset the properties with the 2 functions below.

If you are able to get to the code window, and the Immediate window, than
just enter:
? ChangeProperty(CurrentDb(), "AllowBuiltinToolbars", True)

If you cannot, you can create another database, set the strDB string to the
full path to your database, and set the properties from there.

Function StartupProps(bSet As Boolean)
Dim db As DAO.Database
Dim strDB As String
Dim strPrp As String
strDB = "c:\MyPath\MyFile.mdb"
Set db = OpenDatabase(strDB)

' Application.SetOption "Track Name AutoCorrect Info", False
' Application.SetOption "Perform Name AutoCorrect", False
' Application.SetOption "Log Name AutoCorrect Changes", False

' ChangeProperty db, "StartupForm", dbText, "Customers"
' ChangeProperty db, "StartupShowDBWindow", dbBoolean, False
' ChangeProperty db, "StartupShowStatusBar", dbBoolean, False
' ChangeProperty db, "AllowBuiltinToolbars", dbBoolean, False
' ChangeProperty db, "AllowBreakIntoCode", dbBoolean, False
Call ChangeProperty(db, "AllowFullMenus", dbBoolean, bSet)
Call ChangeProperty(db, "AllowSpecialKeys", dbBoolean, bSet)
Call ChangeProperty(db, "AllowBypassKey", dbBoolean, bSet)

db.Close
Set db = Nothing
End Function

Function ChangeProperty(dbs As Database, strPropName As String, _
varPropType As Variant, varPropValue As Variant) As Integer
Dim prp As Property
Const conPropNotFoundError = 3270

On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Debug.Print strPropName & " is " & varPropValue

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Stuart Clark" <qu*****@moonklash.com> wrote in message'
news:e5*************************@posting.google.co m...
Hi,

I am having quite a major problem with an access database. Basically,
under "Tools => Startup", there are options to disable the Menu's
(e.g. - file, tools etc), the toolbars, the main window, and in fact,
everything.

A vital database has had everything disabled, and so the menus and
windows no longer load when I open the database. This means I can't
get to the
Tools menu to edit the Startup options and reverse the problem.

Does anybody know of any way to fix this problem, or at least to
access
the tables so that the information can be copied and pasted into a new
database.

The only solution I can guess at, is maybe there are some shortcut
keys that I don't know about....

Any help will be greatfully appreciated!

many thanks,
Stu.

(queries@moon DON'TSPAMME klash.com)

Nov 13 '05 #2

P: n/a
Hold shift while loading the DB, this will bypass all startup settings.

Alec Christie
alec_e_christie(at)hotmail(dot)com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

P: n/a
Alan,
I inherited an application with no security in it at all.
Per this code that you submitted, I have some questions:
The database I maintain is used by 15 users, some concurrently.
ChangeProperty db, "StartupShowDBWindow", dbBoolean, False<<

Aside from hiding the container, I need to have it not available at
all the whole time the app is up and running. The f11 keystroke needs
to be disabled. As a programmer, I would like to get it via something
like CTRL+SHIFT+PageDown...can this accomplish the same task as the
more well known "F11"? I do not want the users to have accessibility
to the container at any time because they are adding tables and other
objects to it that are bloating the socks off of the .mdb size. They
are also modifying data in the raw tables which is a no-no. (I'll
build them some forms with editing in them to maintain data integrity)
How do I modify the data below to where it will do the following at
startup (and remain this way until the app is closed:

As you know, when you double click the app from Explorer and hold down
"SHIFT", you get the container.
When my app starts up, how can I check to see if:
1. they held down the Shift Key; then if they did, disable the
container.
2. set a different keystroke to raise the container later by the
programmer (ie. via "CTRL+SHIFT+A"?)

Thanks.
------------

Function StartupProps(bSet As Boolean)
Dim db As DAO.Database
Dim strDB As String
Dim strPrp As String
strDB = "c:\MyPath\MyFile.mdb"
Set db = OpenDatabase(strDB)

' Application.SetOption "Track Name AutoCorrect Info", False
' Application.SetOption "Perform Name AutoCorrect", False
' Application.SetOption "Log Name AutoCorrect Changes", False

' ChangeProperty db, "StartupForm", dbText, "Customers"
' ChangeProperty db, "StartupShowDBWindow", dbBoolean, False
' ChangeProperty db, "StartupShowStatusBar", dbBoolean, False
' ChangeProperty db, "AllowBuiltinToolbars", dbBoolean, False
' ChangeProperty db, "AllowBreakIntoCode", dbBoolean, False
Call ChangeProperty(db, "AllowFullMenus", dbBoolean, bSet)
Call ChangeProperty(db, "AllowSpecialKeys", dbBoolean, bSet)
Call ChangeProperty(db, "AllowBypassKey", dbBoolean, bSet)

db.Close
Set db = Nothing
End Function
Nov 13 '05 #4

P: n/a
To disable the F11, set the property "AllowSpecialKeys.

To make an alternative key combination, use an AutoKeys macro.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Irish" <rl**********@yahoo.com> wrote in message
news:13**************************@posting.google.c om...
Alan,
I inherited an application with no security in it at all.
Per this code that you submitted, I have some questions:
The database I maintain is used by 15 users, some concurrently.
ChangeProperty db, "StartupShowDBWindow", dbBoolean, False<<

Aside from hiding the container, I need to have it not available at
all the whole time the app is up and running. The f11 keystroke needs
to be disabled. As a programmer, I would like to get it via something
like CTRL+SHIFT+PageDown...can this accomplish the same task as the
more well known "F11"? I do not want the users to have accessibility
to the container at any time because they are adding tables and other
objects to it that are bloating the socks off of the .mdb size. They
are also modifying data in the raw tables which is a no-no. (I'll
build them some forms with editing in them to maintain data integrity)
How do I modify the data below to where it will do the following at
startup (and remain this way until the app is closed:

As you know, when you double click the app from Explorer and hold down
"SHIFT", you get the container.
When my app starts up, how can I check to see if:
1. they held down the Shift Key; then if they did, disable the
container.
2. set a different keystroke to raise the container later by the
programmer (ie. via "CTRL+SHIFT+A"?)

Thanks.
------------

Function StartupProps(bSet As Boolean)
Dim db As DAO.Database
Dim strDB As String
Dim strPrp As String
strDB = "c:\MyPath\MyFile.mdb"
Set db = OpenDatabase(strDB)

' Application.SetOption "Track Name AutoCorrect Info", False
' Application.SetOption "Perform Name AutoCorrect", False
' Application.SetOption "Log Name AutoCorrect Changes", False

' ChangeProperty db, "StartupForm", dbText, "Customers"
' ChangeProperty db, "StartupShowDBWindow", dbBoolean, False
' ChangeProperty db, "StartupShowStatusBar", dbBoolean, False
' ChangeProperty db, "AllowBuiltinToolbars", dbBoolean, False
' ChangeProperty db, "AllowBreakIntoCode", dbBoolean, False
Call ChangeProperty(db, "AllowFullMenus", dbBoolean, bSet)
Call ChangeProperty(db, "AllowSpecialKeys", dbBoolean, bSet)
Call ChangeProperty(db, "AllowBypassKey", dbBoolean, bSet)

db.Close
Set db = Nothing
End Function

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.