PDA

View Full Version : Is it possible to programmatically edit records that have been locked



wedd
09-27-2011, 05:04 AM
Is it possible to programmatically edit records that have been locked through the property settings? I have fields on a form which are locked and prevent the user causing a typing mistake. I've create a command button, the event should trigger when clicked to allow the user then to edit data. Is this possible to do? If so, would there be any sample code to do this online, or any type of code you may have written for a similar issue? I'm a novice user of vb6, so this would be a great help for me learning this programming language.


Thanks for your contributions:friends:

HiTechCoach
09-28-2011, 10:27 AM
VB6 or Access's VBA?

Note: Access 2000-2003 use teh VB6 editor to edit the VBA code in Access. Access does not use VB but a version of VBA specific for Access.



Is it possible to programmatically edit records that have been locked through the property settings?

Depends on which property you are referring on how you can edit the data.

If the Form's record source is updateable then you can edit the data with VBA code in the form that modifies data in controls. Even locked controls.

You can always run an Update query or record set to modify data directly in the table and bypass the form. This is how unbound form's work.


TIP: A great way to learn Access is to experiment on a copy of your front end and back end. This is another reason why I split all my databases. It makes experimenting and testing a lot easier.