One way that you could do this is to disable all of the fields that you want
to protect in the form's design view. Then add a method for the user to
enter the password (i.e. a text box on the current form, a command button
that runs a password verification, etc). If the password is correct, then
you can just enable the fields.
field1.enabled=true
field2.enabled=true
Depending on the names you are using for your fields you could also set up a
loop to enable the fields that you need to protect.
If the fields contain numbers to differentiate them:
For i = 1 to 2
me.controls("field" & i).enabled=true
next i
If the fields have a common string in the names:
Dim ctrl as Control
For Each ctrl In Me.Controls
If ctrl.Name Like "*protected*" Then Me.Controls(ctrl.Name).Enabled =
True
Next ctrl
--
HTH
Jason Rice
"Abbe9508" <(E-Mail Removed)> wrote in message
news:A44B7CD4-E6A1-4F22-8B00-(E-Mail Removed)...
>I am setting up a database in which customers will enter their feedback and
> in the same form I have a section "for office use only" that will be used
> by
> employees to tabulate information from the upper part of the form. I am
> wanting to protect the bottom by password so that only a few trained
> people
> can enter this information. How do I do this? (I already know that I can
> protect an entire form, but what about parts of the form?)
|