>>Hi everybody,
>>
>>I'm not sure, how can I add items to the collection based on their TabOrder in the form.
>>
>>Here is my current code, I'd like to modify it to put controls in the TabOrder sequence. How should I do it?
>>
>>
>>*---------------------- Location Section ------------------------
>>* Library: Aformssearch.vcx
>>* Class: Frmquicksearch
>>* Method: Registercontrols()
>>*----------------------- Usage Section --------------------------
>>*) Description:
>>*)
>>
>>* Scope: Public
>>* Parameters:
>>*$ Usage:
>>*$
>>* Returns:
>>*--------------------- Maintenance Section ----------------------
>>* Change Log:
>>* CREATED 05/20/2005 - NN
>>* MODIFIED
>>*----------------------------------------------------------------
>>lparameters tcClassName, tcNamedSearch
>>
>>with thisform.oSearchCollection
>> if .getkey(m.tcNamedSearch) = 0
>> .add(m.tcClassName, m.tcNamedSearch)
>> endif
>>endwith
>>
>>
>>
>>My container object has a name of "o" + m.tcNamedSearch and it's placed directly on the form.
>>
>>Thanks in advance.
>
>Nadya,
>
>I don't believe you can add a property or method to a class with an m. prefix. Try
>
>.add(tcClassName,tcNamedSearch)
>
>
>Regards,
Jim,
That code is working fine, I'm not sure, what are you after? You didn't answer my question, though. I see, that Add method has optional parameters, but I'm not sure, how to use them in my situation. Should I just use TabOrder as eBeforeItem? I have my TabOrder as 1-5 for the containers I want to add to this collection.
If it's not broken, fix it until it is.
My Blog