I want to be able to change a forms RecordsetType property to 'snapshot' to prevent edits. The macro or VB to do this is run from a button on a different form.
I have tried this with the a macro but no joy.
Trying now with VB.
It looks like the form must be open to change the property so I am opening the form, changing the property and then closing the form.
DoCmd.OpenForm "frmChanges"
Forms!frmChanges.RecordsetType = 2
DoCmd.Close acForm, "frmChanges", acSaveYes
The form opens and closes ok, but the property is not being set: No errors are issued so not sure where I am going wrong.
Access help says this property can be set with a macro or VB.
Any suggestions appreciated.
I have tried this with the a macro but no joy.
Trying now with VB.
It looks like the form must be open to change the property so I am opening the form, changing the property and then closing the form.
DoCmd.OpenForm "frmChanges"
Forms!frmChanges.RecordsetType = 2
DoCmd.Close acForm, "frmChanges", acSaveYes
The form opens and closes ok, but the property is not being set: No errors are issued so not sure where I am going wrong.
Access help says this property can be set with a macro or VB.
Any suggestions appreciated.