Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COMBO
Message
De
30/05/1997 12:58:42
 
 
À
30/05/1997 12:39:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: COMBO
Divers
Thread ID:
00034077
Message ID:
00034274
Vues:
39
>>>>>>>I have a combo box that is build by an array. When adding value I do an array insert. All of this is working just fine. I can look in the debug window and see that the array is built with all the correct records. Although when I go to the combo it displays only the first record of the array, I can not pull down and view the other record.
>>>>>>>
>>>>>>>Help Does any have ideas on what I might need to set on the combo box?
>>>>>>>
>>>>>>>
>>>>>>>Thank you
>>>>>>>
>>>>>>>
>>>>>>>HOlly Clawson
>>>>>>
>>>>>>Tell me step by step how you made you COMBO using an aray.
>>>>>
>>>>>
>>>>>Init event of the form set
>>>>>Dimension aParentno[1]
>>>>>
>>>>>select compname ;
>>>>> from custmast ;
>>>>> where customer.parentno = custmast.custno into array aParentno
>>>>>
>>>>>
>>>>>Gotfocus of the combo box:
>>>>>
>>>>>
>>>>>if !mnew
>>>>>
>>>>> select compname ;
>>>>> from custmast ;
>>>>> where customer.parentno = custmast.custno into array aParentno
>>>>>else
>>>>> select compname ;
>>>>> from custmast ;
>>>>> into array aParentno
>>>>>
>>>>> gnCount = _TALLY
>>>>> gcName = CUSTMAST.COMPNAME
>>>>>
>>>>> IF ASCAN(aPARENTNO, gcName) = 0 && Search for company
>>>>> *** Company not found-add it ***
>>>>> DIMENSION aPARENTNO[gnCount+1]
>>>>> = AINS(aPARENTNO, gnCount+1)
>>>>> APARENTNO(GNCOUNT+1)=GCNAME
>>>>> endif
>>>>> THISFORM.REFRESH
>>>>>endif
>>>>>
>>>>>The combo is set to array with the rowsouce = to the array.
>>>>>All of this works, The problem is that when I pull down the combo it only displays the first record of the array. like I said I can debug and see all of the records that are displayed in the Array.
>>>>>
>>>>>Holly
>>>>
>>>>Hi Holly - are you sure it is the first record of the array and not the last.
>>>>try GOTO TOP at the end of your code...
>>>
>>>Just minor opinion from passer-by:
>>>1. Rob, array has no 'records' so your suggestion to GO TOP is not relevant.
>>>2. Holly, any time you change RowSource you should Combobox.Requery().
>>
>>Edward - Holly said:
>>>>>All of this works, The problem is that when I pull down the combo it only >>>displays the first record of the array.
>>Displaing the first record of the array is not the same as...
>>>1. Rob, array has no 'records' so your suggestion to GO TOP is not relevant.
>
>But you suggested GO TOP, didn't you? "Hi Holly - are you sure it is the first record of the array and not the last.
>>>>try GOTO TOP at the end of your code..."
>Holly posted the question with slightly wrong definition "first record of the array", so you could correct her "first element of array". And anyway GO TOP is not relevant here.

I should know better. By GOTO TOP I meant that the pointer to the array maybe
pointing to the last element of the array. Next time, I will be more specific...
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform