Topics Search

Pasted record in locked form crashes database

Pasted record in locked form crashes database
Views: 0
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:

Similar posts...


Notify use that the record is locked for editing?

Notify use that the record is locked for editing? Icon
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 ?

Updating Form

Updating Form Icon
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.

Locking a record

Locking a record Icon
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.

unable to add new record

unable to add new record Icon
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

Hyperlink on a subform?

Hyperlink on a subform? Icon
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.

How to check if database is locked from VB Outlook

How to check if database is locked from VB Outlook Icon
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

Bollean Yes/No locked record to edition

Bollean Yes/No locked record to edition Icon
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

database crashes

database crashes Icon
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

Checkbox locks subform but becomes unlocked when form reopened?

Checkbox locks subform but becomes unlocked when form reopened? Icon
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

Form locked - won't allow new record

Form locked - won't allow new record Icon
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