Lock edition after entering data

F

FiluDlidu

Hi all,

I'm a total beginner at playing with databases, but with someone's help
(he's also rather beginner than expert) I managed to get something half
started.

Now I have this form where I would like people to enter data, but I also
wish it could lock the value in after whoever is entering the data confirm
the value for that specific reading.

What would be an easy way to do this??

Thanks for any help,
Félix
 
B

Beetle

Several ways you *could* do it.

You could use the AfterUpdate event of a control.

You could use the forms OnCurrent event and trap for a null value.

You could create a command button on your form and use the OnClick event.

Which way is *easiest* all depends on your circumstances and what your
preferences are.
 
F

FiluDlidu

Thanks Sean,

I'm happy I actually know what you are talking about despite not knowing
much about Access... but I don't know what expression I could use to lock up
a hypothetical Field1 if I were to use an AfterUpdate event (the one among
your proposals I'd be the most inclined to use at this moment).

Would it be asking too much to beg a little more help?

Félix
 
P

Pieter Wijnen

I'd use either a Date/Time field or a UserStamp Field to achieve this so
you'd know when or who'd done it
In a secured database you'd use the built-in CurrentUser() function or you
can use the Windows logged on user (see www.mvps.org/access)
at any rate the code would be something like:

Private Sub Form_Current()
If Not Me.NewRecord And Not IsNull(Me.MyValidationControl.Value) Then
Me.MyControlToLock.Locked = TRue
End If
End Sub

HtH

Pieter
 
Top