Dear All,
I have wriiten generic Openform and close form SUBs in the Modules area, which I call by their names to open and close forms, this saves me having to retype the full code for opening and closeing forms, I have also written variations to the openform where it opens in read only or edits etc.
The code for this I will give below
Sub OpenFormAdd(OF, CF As String)
DoCmd.Openform OF, acNormal, , , acFormAdd, acDialog
DoCmd.Close acForm, CF, acSavePrompt
End Sub
-------------------
the sub is called from the on click events of a button on any form by simply typing the name OpenFormADD then the name of the form to open followed by me.name to indicate the current is the form to close.
I want to know is it possible to write a generic sub, which will change the data entry status of a form, my goal is to have a sub which when called will allowedits on the current form.
I can't seem to get it to work though. I could work around it and open the form again with allowedits but that if possible I want to just change the property instead of re-opening the form.
Thanks in advance for any help.
Idd
I have wriiten generic Openform and close form SUBs in the Modules area, which I call by their names to open and close forms, this saves me having to retype the full code for opening and closeing forms, I have also written variations to the openform where it opens in read only or edits etc.
The code for this I will give below
Sub OpenFormAdd(OF, CF As String)
DoCmd.Openform OF, acNormal, , , acFormAdd, acDialog
DoCmd.Close acForm, CF, acSavePrompt
End Sub
-------------------
the sub is called from the on click events of a button on any form by simply typing the name OpenFormADD then the name of the form to open followed by me.name to indicate the current is the form to close.
I want to know is it possible to write a generic sub, which will change the data entry status of a form, my goal is to have a sub which when called will allowedits on the current form.
I can't seem to get it to work though. I could work around it and open the form again with allowedits but that if possible I want to just change the property instead of re-opening the form.
Thanks in advance for any help.
Idd