I am using the control array workaround in my Access 2002 apps in multiple forms.
What I want to do is take the code and functionality that doesnt belong in the forms and move the code to modules.
So, I try to do this with a call:
and receive the call like this, then attempt to use a control array:
Of course the code errors out as the control array trick seems to work only within the form using "me".
Does anyone have some sample code that shows how to use a control array within a module after passing the module a reference to the form?
Much obliged,
JBG
Code:
me("txtSomeControl_" & x)
What I want to do is take the code and functionality that doesnt belong in the forms and move the code to modules.
So, I try to do this with a call:
Code:
s_SomeSubroutine me
and receive the call like this, then attempt to use a control array:
Code:
public sub s_SomeSubroutine(byval frmForm as Form)
dim x as integer
for x = 0 to 4
frm("txtSomeControl_" & x) = x
next x
end sub
Of course the code errors out as the control array trick seems to work only within the form using "me".
Does anyone have some sample code that shows how to use a control array within a module after passing the module a reference to the form?
Much obliged,
JBG