In the OnCurrent event of your form
Me.AllowEdits = false
Then you can create a command button and in the onclick event
Me.allow edits = true
for the times when you do want to edit
Leigh
Main Topics
Browse All TopicsI am a beginner and this is a really simple database i've got - one table, one form so far. I just want to be able to lock each record, one at a time so that I don't accidentally change field values as I move through the material.
I've already seen how to use properties to lock one filed at a time; I just want to use one click to do that to the entire record at one time. Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
HI Leigh -
Where would I find the "oncurrent event" of the form? A quick search for oncurrent in help didn't pick up that term.
Please note - My goal for this aspect of the database is to lock one record at a time so once I'm done entering that record it won't accidentally get changed as I do other mods in the file.
Open yor form in design view
right click on thesmall square where the rulers intersect in the top left hand corner and go to properties.
In the property sheet go to the EVENT tab
On Current should be the first event in the list
Click in the text section to the right. You should get a drop arrow and a ... button
Clik the drop arrow and select Event Procedure
then click on the ... button
This will open the code window which should show something like this
Private Sub Form_Current()
End Sub
enter the code between the lines eg
Private Sub Form_Current()
Me.AllowEdits = false
End Sub
This will lock the form for editing every time you move to another record.
To unlock a particular record you will need to create a command button and enter the unlock code "Me.AllowEdits = false" in the command buttons OnClick event.
Leigh
Business Accounts
Answer for Membership
by: DatabaseMXPosted on 2009-11-04 at 15:30:01ID: 25745304
If you set the Form's AllowEdits property to No ... then each record will be 'locked'. I'm assuming this is some sort of read only application ?
mx