Pasted record in locked form crashes database
[Forms]![F_Parts_Search]![F_Parts_Browse_All].Locked = bLock
This worked fine until I found out that a record can be selected and pasted but then because of a unique index on a control you can't move on and can't edit the field with the unique index so youre stuck.
I can't seem to get the following code to prevent additions if that is what I want to do? I get a runtime error 438 "object does not support this property or method...
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I run a few complex calculations at form level and I have set record locking in that form to "Edited Record". This works great but if another user on the network opens up the same record it causes a lot of problems with my form (I think its because some of the calculation code is trying to update the "locked" record)
Is there anyway of notifying users that the record is currently locked for editing? Perhaps also a flag so I don't run calculations on locked records ?
Private Sub Form_Current()
If Me.Approved = False Then Family.Locked = False DataX.Locked = False Model.Locked = False
Family.Locked = True DataX.Locked = True Model.Locked = True
User 2 selects the same record and is able to edit it. THIS is what I need to prevent. If a user has a record displayed on the form I want it to be locked so that when another user tries to select that record they are told that it is locked. Selecting the option "Edited Record" does not do it.
When I save and close the 2nd form, the 1st form will not show the new record until I close and reopen it. Is there a way to update the 1st form after saving the new record in the 2nd form. See attached view of the two forms.
You tried to update a field in a record or table that is currently locked by another user. Wait for the other user to finish working with the record or table, and then try the operation again.
In Microsoft Access, you tried to change the value of a control whose Locked property is set to Yes.
I am the only one using the database and can not find any field that is set to "locked". The database is ready to use but I need to solve this problem, any ideas what to do
Here is where it gets stranger. .problem happens on multiple databases and I can copy the DB to another computer with Access 2007 (Same version) and Compact/Repair works fine.
For problem / attempted corrections I have tried the following with no luck
Checkdsk - OK
Boot in Save Mode - Compact / Repair still crashes
Move DB to another HD on my computer (Thinking I may have disk failing) - Compact / Repair still crashes
Uninstall / Install Access - - Compact / Repair still crashes
Does anybody have an example of code that will check if database is locked. If database is locked, data from the form can not be imported and user should be notified. Is there an error code for it, like there is a code 53 if database file is missing
However, I've had this issue of not being able to compact and repair this database for a long time. Every time I try it, it freeze up on me. This database is on one of our network drives. I tried to copy to my hard drive and it also hang up!
I am at the end of my rope here
I can only go into it in Design View but when I try to delete the form to get rid of it, Access crashes.
Trouble is I can't keep that form because now I can't go into VB as it crasshes then too.
The database the form came from works absolutely fine and I've used it for years.