Lock Record for Editing on a Linked table
Now, It has been decided to get the necessary tables data in a local tables when application starts, update it locally and then update the original database on server finally.
Everything is done and working fine.
The problem starts here:
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Then in the After_Update event of myName put the following code
I have used this this morning (in a different project to the original question) and it works while I'm still in the record. However when I exit the record and re-enter it the field can be edited again.
Is there a way I can lock this field so that it can never be edited. I don't really want to lock the whole record if I can help it.
If I'm in a form view does that lock the table?
I don't want the table locked, as I want one user to be able to insert a new record at any time and still allow poweruser to edit current records.
What I am doing now is add a toggle button and the following code for my form :
Private Sub tglLock_Click() Me.AllowEdits = Not Me.AllowEdits Me.tglLock.Caption = IIf(Me.AllowEdits, "Lock", "Unlock") End Sub
However this is not really working well. I can still alter fields in the form. Is there a way to prevent any editing at all for that current record ie all fields are locked and non clickable
If you save the record, you will overwrite the changes the other user made.") even when no other user even has Access open.
This does not happen in other tables in Access, and did not happen in this table before we deleted and re-added the fields in SQL 2005. We can still modify fields in this table using a query - *except* the fields that we deleted and re-added, which now give the record lock message even if we attempt to modify them using a query.
We tried running the Compact and Repair function in Access, and rebooting the system, but the issue persists. How can we fix this?
Q1: Instead of relying on the Lock.Indicator in the Rec.Selector, is there any VBA function that can return this state?
Q2: Is there some code to block other users from editing a particular same record
For example, if John is no longer an emplyee I want to lock it and never be able to unlock it again
For example, if John is no longer an emplyee I want to lock it and never be able to unlock it again.
if you can help me in the sample file
The ECN table contains a 'Closed' checkbox (Yes/No) field.
What I want to do is lock the ECN table record and the related Part Number record(s) when the checkbox is ticked (Yes).
Can anyone let me know (a) if this is possible and (b) what I need to do
I have done something similar to this before where there was a subform and I had used AfterUpdate to lock the subform, but I dont think this is quite as straight forward.
Any ideas on links to other threads/sites with a solution?
I have tried using the "Data Entry" property of a form, but its behavior is different from what I want to achieve