Pasted record in locked form crashes database

I have a form with a subform and on the main form I have a toggle button that locks the subform.

[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...

Sponsored Links:

Related Topics

Notify use that the record is locked for editing?
I've a DB with is currently split into a FE/BE structure. The db is developed in AC2010.

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 ?

database crashes
all. I changed a control on my form to a combobox when I try the view the form it crashes! I get that error where the database has encountered a problem and must close! what's going on please

Bollean Yes/No locked record to edition
In the main Form I have some code which locking records (is put 'On current' event). Code works properly for records which were entered before to table ie. records with flag can not be edited and vice versa. The problem is when I would like add some new records then is not possible to put any value, for any field it looks like that everything is locked.

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

Locking a record
One back-end, multiple front-ends. User 1 selects a record and the form gets the data and displays it.

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.

Compact and Repair crashes on larger databases
When I try to run compact and repair on any database that is ~500MB or larger, Access crashes . It is pretty consistent on when it crashes. e.g. a DB that is 692MB crashes when the temp DB reaches 569MB.

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

Updating Form
I have 2 forms. One has all the fields locked so no one can change anything from inside the form. I have a button on the form that opens up an identical form but not locked so one can enter a new record.

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.

unable to add new record
I have created a database using the tab control to give me extra pages. Everything seemed to be working OK until I wanted to add a new record. I got a message "field can not be updated" I went to help to find out why and got the following;
Possible causes:
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

How to check if database is locked from VB Outlook
I have a custom form that imports data from a form in Outlook into Access database.

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

Database crashes after table update
My 886 Mb access database crashes at any time I use the form I use to navigate it as the main menu. This just happened after I updated one of the tables. If I don't use the form, everything goes well. This is my most recent problem.

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

Can't delete object - MSAccess crashes
I was working on a datablase for a few weeks and all was well. I then decided to import a Form from another database to adapt and use. But now Access keeps crashing everytime I try and open that imported Form.

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.

Checkbox locks subform but becomes unlocked when form reopened?
Ive got a form that has a checkbox that when enabled, locks the subform within the main form. I have been using the Afterupdate event for this function, code is pasted below:

Private Sub chkDischarged_AfterUpdate()
If Me.chkDischarged = False Then
Form.sfrmPatAct.Enabled = True
Form.sfrmPatAct.Enabled = False
End If
End Sub

The problem is that when that record is reopened in that form, even though the checkbox is ticked, the subform is not locked, anyone got any ideas on why this is happening

Hyperlink on a subform?
I have a form with a subform. The subform is a list of all the records in the database. I would like to add a field to the subform table/list that would hyperlink the user to the record's profile form once clicked.

I have a similar hyperlink in my database on another form and it works correctly, but for some reason, when I set the hyperlink up in my subform it doesn't direct to the correct record or it just opens the form to a blank record.

I copied and pasted the fields from the form that worked into the subform and what I explained above is what happens.

Form : Lock all controls in form
I have a field named 'Locked' (which is a check box) in my form that is bound to the master table.

The checkbox stores TRUE or FALSE in the table.

I would like to lock all control properties in the form and subform (except for the 'Locked' control) automatically when selecting the LOCKED control and on leaving the record.

A simple VBA solution using the event 'after update' would be appreciated.

Form with several necessary options
85k records, Each record has a unique identifier that should not be changed. Each record has an owner that should not be changed. There are several incomplete fields on each record.

What I want to happen:
I want a form that I can select an owner and the form will filter all records to display the first incomplete record by that owner. I need 3 fields to be locked in each record when they load including the "Owner", "Unique Identifier" and one other.

I need 4 fields to remain open to editing unless a "Record Complete" yes/no box is checked in which case if the record is complete it should be completely locked AND it should not show up in the filtered list.

What I can make happen:
Using a form/subform of an Owner-Owner relationship I can filter all the forms to display only that Owner's records. Unfortunately when I try to click anywhere I get a message that a duplicate record will be created and then cannot enter any information.

Alternatively I can lock the main form or not allow additions and then the combo box drop down becomes locked and I can't select an "Owner" to filter by (my results were the same by attempting a VBA filter on a single form instead of a form/subform).

Opening a Form and locking all controls
I like to create a form for managing client data with the following behaviour:
When the form opens all controls are displayed, without any data in it and locked.
When clicking on a button to enter a new client, all controls must be unlocked, and after entering the new client and hitting the button "Save",
all controls must be locked again, the new record displayed and the appropriate navigation buttons activated.
The same behaviour must be realised when hitting the button to "edit" a record . If for some reason the editing a record or the entering a new record must be canceled, all controls must be locked again and the appropriate navigation buttons activated. .
Is that a possible goal and are these requirements realistic for such a form

Form locked - won't allow new record
Several memo fields in one record in my database got corrupted, and another record was eliminated. To solve the problem, I created a new database and imported the tables, forms, etc.

I've done this several times with no problems, one of the forms will not allow me to edit data (it dings when I try), and I cannot enter a new record (the asterisk is greyed out).

What did I do? Can this be fixed or do I need to start from scratch with the form? I can go into the table and edit the fields, and there are noproblems with the other forms.

Form locked - won't allow new record
Several memo fields in one record in my database got corrupted, and another record was eliminated. To solve the problem, I created a new database and imported the tables, forms, etc. from the corrupted database into the new one. I've done this several times with no problems, but today, one of the forms will not allow me to edit data (it dings when I try), and I cannot enter a new record (the asterisk is greyed out). What did I do? Can this be fixed or do I need to start from scratch with the form? I can go into the table and edit the fields, and there are no problems with the other forms

Locked field if the default field editable at first - Access 2007
I just found something very odd in Access 2007.

I have a form with various field controls.

The control I had as the default (0) control was a Locked / read-only field. I COULD EDIT THE FIELD until moving to another field and then returning to the original field THEN it was locked.

I set another field (which is not a locked field) and going back to that same locked field indeed results in a locked field.

Is there something (a bug) with that default (0) fields are always editable at first?

Adding Option Group crashes - only on one form
If I add a simple yes and no option group to a form that is not linked to a table, and exit design view, Access crashes with no details and wants to send the report to Microsoft.

If I do the same thing on any other form in the database, I have no problem. I'd like to add an option group so thought I'd reach out for ideas.

Where would one look for hints?

Enable checkbox when locked textbox changes
I have a form that has a locked textbox and other textboxes (not locked) and some checkboxes. I would like to enable two of the checkboxes when the data on the textbox changes. I added a not visible textbox with the control source of the locked textbox and used it's afterupdate event, but this does not fire as I tab through the records. What do I need to do to make thiswork?