Locking Entries

S

Sok Hong

Is there a way to code so that you only lock only
specified functions? I've tried

Private Sub Form_Current()
Dim bAllow As Boolean

bAllow = Me.NewRecord
Me.[SomeControl].Locked = bAllow
Me.[AnotherControl].Locked = bAllow
...
End Sub

however, this will only allow me to lock it when I am on
that particular entry. Once I go to a different entry and
refer back to it, the entry will be unlocked.
Anythoughts? Thanks.
..
 
J

John Vinson

Is there a way to code so that you only lock only
specified functions? I've tried

Private Sub Form_Current()
Dim bAllow As Boolean

bAllow = Me.NewRecord
Me.[SomeControl].Locked = bAllow
Me.[AnotherControl].Locked = bAllow
...
End Sub

however, this will only allow me to lock it when I am on
that particular entry. Once I go to a different entry and
refer back to it, the entry will be unlocked.
Anythoughts? Thanks.

Bear in mind that the Form *is just a window*. You're locking
*controls on a form*, not locking *records in a table*.

In fact row-level locking is not at all easy in Access. Could you
describe just what you're trying to accomplish? How do you decide what
records should be locked and which shouldn't?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Locking Entries 1
Locking Entries 0
format fields with a button 2
Locking a record via a form 2
lock button 15
Paste Value 1
Record locking - Integrating Access with Sharepoint List 1
Controlling Edits 2

Top