By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Record Locks

P: 67
Hello again

My Next issue is when I open a form I want all the records to be locked or read only. If any records need to be edited the user will click a button to unlock all the records.

Can you help


Feb 13 '09 #1
Share this Question
Share on Google+
4 Replies

Expert 2.5K+
P: 3,532
Make records Read-Only
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  Me.AllowEdits = False
  3. End Sub

Create a button to unlock record

Expand|Select|Wrap|Line Numbers
  1. Private Sub CmdEditRecord_Click()
  2.  Me.AllowEdits = True
  3. End Sub
Re-lock records when moving to a different record
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.  Me.AllowEdits = False
  3. End Sub
Linq ;0)>
Feb 13 '09 #2

P: 67
Hi Missinglinq

I tried it that way but i can still edit the records.

Ant ideas?
Feb 13 '09 #3

P: 67
Hi Missinglinq

My mistake. It does work but it doesn't work for the very first record.

Is there a way to stop this?

Feb 13 '09 #4

Expert Mod 15k+
P: 31,419
Design the form in the first place with AllowEdits set to False.
Feb 13 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.