protect data in a form, but allow for data entry too

G

Guest

Wondering if anyone can help me with a database form and subform I am using
at work. I have created the respective forms ok, and it has pre-populated
data in it that we want to protect (lock). But we also want to have users
enter additional data in those same fields for a new record on both the
subform and form. I can't find a way to do both things for the same
field...i.e. lock and enable data entry.

For example, we have a list of projects each with a subform that lists the
various "service areas" associated with each project. Some projects already
have service areas populated with data. We want to protect that (not allow
user to change it), but we also want to give the user the ability to add new
service areas and other info in fields in teh subform and form. Can you
help? Thanks.
 
M

MacDermott

In your Form_Current event, (which fires when you move to a different row),
you can put code to check the Me.NewRecord property. If it's true, unlock
(or enable) your textboxes; if it's false, remember to lock (disable) them,
too.


"Protect data, but also allow entry" <Protect data, but also allow
(e-mail address removed)> wrote in message
news:[email protected]...
 
G

Guest

thanks... I do not know anything about coding...can you please explain or
show what needs to be done? Thanks. Also, what is Form_Current event?
 
M

MacDermott

That's a pretty big request for a newsgroup.
If you want to do things which require coding, I'd suggest that you go ahead
and learn a bit about coding. Go to a bookstore and browse the books on
Access coding until you find one that fits your style, or buy a video, or
take a class at your local computer center or community college...
Once you have figured out what an event is (in programming), and
specifically what a Form_Current event is in Access, please look at my
suggestions again. If you still have questions, explain what's unclear
(you'll probably want to start a new thread by then), and folks here will be
glad to assist, I'm sure.


"Re: protect data in a form, but allow fo" <Re: protect data in a form, but
allow (e-mail address removed)> wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top