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


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.

Form with several necessary options

Form with several necessary options Icon
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).

Can't delete object - MSAccess crashes

Can't delete object - MSAccess crashes Icon
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.

next record navigation button changes to new record

next record navigation button changes to new record Icon
Is there a way to prevent the next record navigation from becoming a new record.

I have a form with a next record button, which if you come to the end of the existing records and press it again becomes a new record button and effectively bypasses any locked condition of the form.

The default Next record button on a table or query works in the same fashion

Record Locking Multiuser

Record Locking Multiuser Icon
I have created a multiuser database. In order to prevent more than one user editing the same record I have set the record locks to "edited record" This seems to create a lot of unwanted record locking issues for the users: Some records get locked and the only way to unlock them seems to be closing and reopening the database.
I have thought about putting some unlock buttons on the forms but it would not work because I have another automated way to lock the records: when the record is complete a supervisor enters his/her name on the form and this action locks the record to users (I do not want to allow any changes to the records after the supervisor review).

Grouping records per sheet

Grouping records per sheet Icon
I need to Group somehow records to one report in order to achieve print out of particular form that we use at work. Currently we use MS Word for this task and I want to simplify this task with MS Access,

I need records grouped so the records from the table appear in groups of 3 in one page
Page1 Record 1,2,3
Page2 Record 4,5,6
PageX Record x1,x2,x3.

One records has about 20 various items like: text, number, check box . I have pasted original layout of the MS Word form for my MS Access report and inserted fields from my table/query to the designated spots of the form.
So far I ended with the result of having report displaying:
Page 1 Record 1,1,1
Page 2 Record 2,2,2 or

Page 1 Record 1,2,3
Page 2 Record 1,2,3

How to Skip/Ignore VBA Function/Private Sub?

How to Skip/Ignore VBA Function/Private Sub? Icon
I have some code that checks the date AND user ID to ensure that there has not been a record for that date and user ID on Form B. This works without issue. On the same form I have a text box to input a new date with a command button that then copies over the records information and then creates a new record with that new date. This works if I comment out the code that checksout the date and user ID.

When the user first gets into the database they input the user ID on Form A, and then Form B pops up. On the load event of Form B, it takes the user ID from Form A and places it in the userID of Form B, which is locked.

My problem is that if I enable the code for the data and user ID check, it causes the database to hang when the user tries to have the record copied over to a new one.

My question is how can I tell the button that when clicked ignore, skip, or temporarily disable the code that checks the date and user ID?

Enable checkbox when locked textbox changes

Enable checkbox when locked textbox changes Icon
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?

Adding Option Group crashes - only on one form

Adding Option Group crashes - only on one form Icon
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?