J
jhcoxx
Hi -
I'm trying to set up a function that will be used for several controls
on several forms - and will be called from an Access macro.
The function is in a general VBA module and I need to pass it a
reference to the form, the control (usually a listbox) and an integer.
The declaration of the function is
Public Function SetListBox(aForm As Variant, lbxBox As Variant, lItemNo
As Long)
and by using the following in the Function box of the RunCode action:
SetListBox([Form],[Forms]![frmAltOpStart]![lbxNonConIdx], 0)
the function sees the reference to the form and to the long integer,
but shows Null for the lbxBox variant. I've tried all the logical and
semi-logical syntax variations I can think of - with no success.
Any suggestions on the error (if not folly) of my ways - and any
suggestions on how to call this function from a subform on the form
would be most appreciated!
James Cox
I'm trying to set up a function that will be used for several controls
on several forms - and will be called from an Access macro.
The function is in a general VBA module and I need to pass it a
reference to the form, the control (usually a listbox) and an integer.
The declaration of the function is
Public Function SetListBox(aForm As Variant, lbxBox As Variant, lItemNo
As Long)
and by using the following in the Function box of the RunCode action:
SetListBox([Form],[Forms]![frmAltOpStart]![lbxNonConIdx], 0)
the function sees the reference to the form and to the long integer,
but shows Null for the lbxBox variant. I've tried all the logical and
semi-logical syntax variations I can think of - with no success.
Any suggestions on the error (if not folly) of my ways - and any
suggestions on how to call this function from a subform on the form
would be most appreciated!
James Cox