473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Wrapping It All Up

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
3 1308
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Roy Smith | last post by:
I've got a C library with about 50 calls in it that I want to wrap in Python. I know I could use some tool like SWIG, but that will give me a too-literal translation; I want to make some...
11
by: yawnmoth | last post by:
word wrapping normally treats some spaces as line feeds, if there hasn't been a line feed for quite a while. so while a string with eighty consecutive a's might not word wrap, a space placed...
5
by: nimdez | last post by:
Hi, I am working on an existing code base in which a lot of data displayed to the user is formatted in tables. Most tables are printed row-by-row using printf() with "%s" print conversion...
2
by: dam_fool_2003 | last post by:
My understanding about wrapping is that we add utilities to a lib function for our specific use. So days ago in the c.l.c I saw a function def as: void * xmalloc (size_t size) { register void...
2
by: Scott | last post by:
I having a problem where I need to turn off the wrapping feature for all columns in my datagrid. Example code would be: <asp:DataGrid id="ResultGrid" runat="server" AutoGenerateColumns="true">...
1
by: mg | last post by:
I set the width of a WebForm Label but do not get line wrapping (see below). What can I do to get line wrapping WebForm1.asp <asp:Labe id="Label1" style="Z-INDEX: 101; LEFT: 40px; POSITION:...
4
by: rodchar | last post by:
Hey all, I have a datagrid that auto-generate the columns. When I run the app some of the column values are wrapping. How do I prevent the values from wrapping? Do I have to use template...
8
by: Nathan | last post by:
I am trying to prevent a horizontal list from wrapping. Each list item is floated with "float: left". Currently I use an ugly hack. I set the width of the list to a large number which is...
9
by: Siv | last post by:
Hi, I am trying to find a wrapping routine for text and not having much luck. The reason I need one is that I am producing a report where the text that was stored in the database was written into...
6
by: Markus Ernst | last post by:
Hi Searching for a possibility to display some text with preserved white space and line breaks, but with long lines being wrapped, I found this CSS declaration, which I found helpful: pre {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.