J
Jesper F
I'm trying to assign function names such as "=Calculate
()", "=Modify()" etc. to the event properties of certain
controls in a form. This needs to be done through code. I
have a large number of forms where the event properties
are altered from time to time and I'm building a toolbox
to make it easier for myself.
Right now I have this working:
Dim sFunctionname
sFunctionname = "=Calculate()"
Docmd.openform "formname", acDesign
Forms!formname.Form(controlname).OnEnter = sFunctionName
However if I try to name the event with a variable I can't
get it to work:
Dim sEvent
sEvent = "OnEnter"
Forms!formname.Form(controlname).sEvent = sFunctionName
and I'm getting a "property not allowed" error.
Do any of you know which syntax to use here?
Thanks for any help.
()", "=Modify()" etc. to the event properties of certain
controls in a form. This needs to be done through code. I
have a large number of forms where the event properties
are altered from time to time and I'm building a toolbox
to make it easier for myself.
Right now I have this working:
Dim sFunctionname
sFunctionname = "=Calculate()"
Docmd.openform "formname", acDesign
Forms!formname.Form(controlname).OnEnter = sFunctionName
However if I try to name the event with a variable I can't
get it to work:
Dim sEvent
sEvent = "OnEnter"
Forms!formname.Form(controlname).sEvent = sFunctionName
and I'm getting a "property not allowed" error.
Do any of you know which syntax to use here?
Thanks for any help.