I had a heck of a time figuring out the array RowSource issue. I figured,
since the listbox or combobox Inits before the form Inits, that the
controls wouldn't be able to see a RowSource array on the form. But that's
not true.
So, if you add your rowsource arrays as properties to the form at design
time, using the New Property option from the Form menu, the listboxes and
comboboxes will see them. Make sure to specify the arrays as:
aMyArray[1]
If you call code to fill those arrays from the form's Init() method, the
controls will be populated when the form appears.
You can load the array in the Load method and it works fine. Perhaps I
misunderstand the problem here. I load my form property arrays in the Load,
set the RowSource property to the array at designtime, set the RowSourceType
to "Array" also at designtime, and everything works like a champ.
Yup, you're right.
I was remarking on the fact that it's somewhat counterintuitive for a
control that ostensibly comes into existence before the form does to be
able to refer to a property of that form--but that's the way it works. It
took me a long time to figure that out, though.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.