I have a Main form(frmHistMain) and a sub form. by default, recordset type property of the main form is set to snapshot. and record locks set to all records. Hence the user cannot change anything.
my concept is to have a button to unlock the form, so the recordset property is to change to dynaset so that i can edit the form and its subform.
I have placed this a button on the form and put this 2 line code into the button on click event.
Forms!frmHistMain.RecordLocks = 0
Forms!frmHistMain.RecordsetType = 0
When i click the button, i note that the form refreshes, but when i try to select a field and edit, it beeps and does not allow edits. However if i manually go into design view and alter the record lock and recordset type property to no locks and dynaset and go back to form view, the button works as intended.
What is wrong?
my concept is to have a button to unlock the form, so the recordset property is to change to dynaset so that i can edit the form and its subform.
I have placed this a button on the form and put this 2 line code into the button on click event.
Forms!frmHistMain.RecordLocks = 0
Forms!frmHistMain.RecordsetType = 0
When i click the button, i note that the form refreshes, but when i try to select a field and edit, it beeps and does not allow edits. However if i manually go into design view and alter the record lock and recordset type property to no locks and dynaset and go back to form view, the button works as intended.
What is wrong?