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

Wrapping It All Up

P: n/a
Ok, I have a very simple database consisting of 1 data table and a
couple support tables. I have two forms, a main menu and a data entry
form.

Now, what I need to do is to have it so that, when a user opens the mdb
file, it only shows them a given form (in this case, the main menu
form). The actual database window should be hidden and should require
a password to unhide, so users can't go in and edit anything.

What is a good way (or any way, really... since I don't know Access at
all) to do this? We're not talking about real production-environment
security here, just something to prevent users from accidentally
breaking things.

Basically, I just want to be able to control user input. If someone
_really_ wants to do some damage, well, that's more of a personnel
problem than a technology problem in this case. I just need to make
the data entry as user friendly and idiot-proof as I can.

Any help would be much appreciated, thank you.
-cyber0ne

Aug 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
open the database to the database window. on the menu bar, click Tools |
Startup. in the Startup dialog, set Display Form/Page to the name of your
menu form, from the droplist. uncheck the box next to Display Database
Window. also, uncheck the box next to Use Access Special Keys (the preceding
applies to A2003. if you're using A2000, i think those "special keys" are
controlled by individual checkboxes, and show up in the dialog when you
click an "Options" or "Additional Options" or "Special Options" button -
something like that. i haven't used A2000 for a couple years, sorry...).

your user can still bypass the Startup setting simply by holding down the
Shift key while opening the database, and that little trick is very easy to
learn about - from books and all over the internet. if you want to go an
extra step, you can disable the AllowBypass option in the database. the code
i normally use follows. make sure that you can *enable* AllowBypass from the
user interface *before* you disable it.

hth

Public Function isResetF()

SetStartupPropertiesF

End Function

Public Function SetStartupPropertiesF()

Const lngBoolean As Long = 1

ChangeProperty "AllowBypassKey", lngBoolean, False
MsgBox "The database is LOCKED, when you next open the application."

End Function

Public Function isResetT()

SetStartupPropertiesT

End Function

Public Function SetStartupPropertiesT()

Const lngBoolean As Long = 1

ChangeProperty "AllowBypassKey", lngBoolean, True
MsgBox "The database is UNlocked, when you next open the application."

End Function

Public Function ChangeProperty(strPropName As String, varPropType As
Variant, _
varPropValue As Variant) As Integer

Dim db As Object, Prop As Variant
Const conPropNotFoundError = 3270

Set db = CurrentDb

On Error GoTo HANDLE_ERROR

db.Properties(strPropName) = varPropValue
ChangeProperty = True

LAST_EXIT:
Exit Function

HANDLE_ERROR:
If err = conPropNotFoundError Then ' Property not found.
Set Prop = db.CreateProperty(strPropName, _
varPropType, varPropValue)
db.Properties.Append Prop
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume LAST_EXIT
End If

End Function
Aug 12 '06 #2

P: n/a
Excellent, thank you!

And thanks for being so helpful to someone so new to this. That's not
often found in newsgroups :)
-cyber0ne

Aug 12 '06 #3

P: n/a
Excellent, thank you!

you're welcome :)
And thanks for being so helpful to someone so new to this. That's not
often found in newsgroups :)
well, in these Access newsgroups, i think you'll find helpful answers the
rule rather than the exception. happy database developing!
Aug 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.