Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box problem.
Message
From
17/09/1997 12:50:53
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00050232
Message ID:
00050419
Views:
28
>>>>I have a COMBO BOX and I am using the STYLE of 0 (Dropdown Combo).
>>>>I have another field (txtname) that is on top of the COMBO BOX and is VISIBLE =.F.. When I APPEND BLANK, I set txtname to VISIBLE =.T., it hides my COMBO BOX by appearing over it. I add my new record. In the LOSTFOCUS event of this field called txtname, I set VISIBLE=.F.
>>>>Now you can see the COMBO BOX again. I would like to have the record I just added to be the value record or currenet record in the COMBO BOX. Any ideas?
>>>
>>>do you mean you had just add a new record into txtbox, if so try:
>>>ThisForm.Combo.Value = ThisForm.txtbox.Value
>>>or
>>>ThisForm.Combo.AddItem(ThisForm.txtbox.Value)
>>
>>Hay Samuel
>>ThisForm.Combo.Value = ThisForm.txtbox.Value adds two records
>>to the table and ThisForm.Combo.AddItem(ThisForm.txtbox.Value) adds
>>one record, but the combo does not show the new record.
>>I spoke to soon.
>
>Hi Rob,
>
>I'm little confused, if you want to add the value of the textbox to the table use ThisForm.Combo.AddItem(ThisForm.txtbox.Value) will add an additional item to the combo box. Check your rowsourcetype property is set to 0 or not.

Hi Samuel... It was my mistake... the rowsourcetype property was set to the
same as the COMBO. When I set the rowsourcetype to none for the txtbox, my
problems were solved. thanks again for your help...rob
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Reply
Map
View

Click here to load this message in the networking platform