bballpinhead wrote:
I am trying to figure out how to lock a record at the point it is
opened in a form. The Access file is going to be stored on a Shared
drive for 3-4 users to access. I need the capability to allow the first
user to enter into the form to allow edit capabilities but if another
user opens the same form they are only allowed to view it and not make
any changes. Any help is appreciated. Thanks in advance!
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You could use the form's AllowEdits property and the OnCurrent event and
the form's NewRecord property.
Private Sub Form_Current()
If Me.NewRecord Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If
End Sub
The only fault w/ this is when the first user enters the data and saves
it, but then realizes he entered something incorrectly & tries to go
back to correct it, he will not be able to correct it 'cuz AllowEdits
will then be set to False. You'll need some sort of override
capability, or a form that only the Administrator can open that will
allow the record to be changed.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBRJw32YechKqOuFEgEQIbhACeOcyhE61UnmeI0hjMXKPoyk CvZQwAoKWl
43vQlGS5CCn1ZA71rLUqZlKg
=75IC
-----END PGP SIGNATURE-----