I have read other messages here and have learned how to create a button and use it to protect and unprotect a form.
Use the following code for the form's On Load event:
Create a button on the form labeled "Edit" and code the On Click event as such:
As is, this works ok...better than nothing. But there are a couple of things that could be improved, specifically:
1. I added a second button to click after the edit was complete to try set the form back to read-only. It didn't work. Appears that the only way to reset the form to read-only is to go to another record.
2. There is a drop-down list in the form's footer. The purpose of this form is to find a specific record by last name and display it without manually scrolling through all records. Problem is, when the form is read-only, this search field doesn't work.
Any suggestions (especially with code) would be greatly appreciated.
Use the following code for the form's On Load event:
Code:
With Me
.AllowAdditions = False
.AllowDeletions = False
.AllowEdits = False
End With
Create a button on the form labeled "Edit" and code the On Click event as such:
Code:
With Me
.AllowAdditions = True
.AllowDeletions = True
.AllowEdits = True
End With
As is, this works ok...better than nothing. But there are a couple of things that could be improved, specifically:
1. I added a second button to click after the edit was complete to try set the form back to read-only. It didn't work. Appears that the only way to reset the form to read-only is to go to another record.
2. There is a drop-down list in the form's footer. The purpose of this form is to find a specific record by last name and display it without manually scrolling through all records. Problem is, when the form is read-only, this search field doesn't work.
Any suggestions (especially with code) would be greatly appreciated.