Lock down records but not page in form

Demetious

Registered User.
Local time
Today, 18:09
Joined
Sep 7, 2010
Messages
48
Is there a way to lock down just the old records? I have a form to insert new records and I want to have the ability to see old records but not edit them. I also have an inventory adjustment page within the form. When I turn editing capabilities off on the form, I lose the ability to update my page as well. Do I have to split them up or is there another way? Thanks!
 
Just put this code in your Form's On Current Event:

Code:
Me.AllowEdits = Not Me.NewRecord
 
Is there a way to lock down just the old records? I have a form to insert new records and I want to have the ability to see old records but not edit them. I also have an inventory adjustment page within the form. When I turn editing capabilities off on the form, I lose the ability to update my page as well. Do I have to split them up or is there another way? Thanks!

Oh, you have two subforms?

That would be different.

I'm checking something.
 
Bob,
My Objects are as follows.

Form = frm_ComponentDetails
Table = tbl_Inventory

I have tried the following;

Me.AllowEdits = Not Me.NewRecord
frm_ComponentDetails.AllowEdits = Not ComponentDetails.NewRecord
tbl_Inventory.AllowEdits = Not Inventory.NewRecord

All return the same error,

Microsoft Office Access cannot find the object "Put object here"

Thanks again for any help. I suck at this but I'm learning =)
 
Oh, thank you. The error went away but I can still edit old records so I'm not sure what that did. :(
 
Yeah, with subforms it is a bit trickier. I would suggest just having a subform with a non-updateable recordsource so that they can't edit them and then have a button to open a form to add new records.

You can make the subform's recordsource non-updateable by going into the properties dialog of the query and choosing Snapshot (in place of Dynaset) or by just grouping the query.
 
Yeah, with subforms it is a bit trickier. I would suggest just having a subform with a non-updateable recordsource so that they can't edit them and then have a button to open a form to add new records.

You can make the subform's recordsource non-updateable by going into the properties dialog of the query and choosing Snapshot (in place of Dynaset) or by just grouping the query.

Thats a great idea, thanks!
 

Users who are viewing this thread

Back
Top Bottom