Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gers blank listboxex and comboboxes

Status
Not open for further replies.

rogerhansen

Programmer
Dec 10, 2002
5
NO
Hi !
I have a problem and need some help. I have one main form with 2 ComboBoxes and 3 ListBoxes. When I stand I one of the ListBoxes, I click on a CommandButton that means Cange. From this CommandButton I open a new form with one close button and one ComboBox. If I alter the ComboBox once, and then return to my calling form, everything is OK. If I alter the ComboBox twice, every ListBox and ComboBox in the mainform gets blank. What is wrong. Pleace help. (Uses VFP5.0)

Roger Hansen
 
rogerhansen,

There really isn't enough information in your post to really give you an answer. You haven't included pertinent information such as what the comboboxes are bound to (controlsource) or even a hint as to what is related to what here. Also, when you say alter the combobox twice I am not sure if you mean that you select something from the combobox twice without leaving the second form or if you mean that the second time you go into that form and select something from the combobox this is happening to you. What code is being run (or at least a quick overview of it) once you select something from the combobox on the second form would be helpful in solving your problem as well. I'm afraid for right now I have more questions than answers for you.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Reply to Slighthaze "Gets blank listboxex and comboboxes"

I don’t use ControlSource but arrays and
RowSource = MyArray,
RowSourceType = 5 – Array
NumberOfElements=MyConst

MyFormMain:
Do form MyForm1

MyForm1:
I build all arrays in GetArr ( New Method in the form )
Do form MyForm2

MyForm2
I build MyArray in actaivate form

No arrays has the same name in any form, All arrays is Private in active form

Sequence1:
I enter MyForm1 (3 ListBox 2 ComboBox) from MyFormMain all with Arrays
Click on CommandButton and starts MyForm2 (Modal form)

Click on ComboBox1 in MyForm2 (Style 2- DropDown List) so it opens
Select one element in the ComboBox so it colapses

Click on ComboBox1 in MyForm2 (Style 2- DropDown List) so it opens for the 2. time
Select another element in the ComboBox so it colapses

Close the form by a CommandButton
ThisForm.Release()

All (3 ListBox 2 ComboBox) is empty.

One combobox that is in the calling Form MyFormMain is empty to

Sequence2:
I enter MyForm1 (3 ListBox 2 ComboBox) from MyFormMain all with Arrays
Click on CommandButton and starts MyForm2 (Modal form)

Click on ComboBox1 in MyForm2 (Style 2- DropDown List) so it opens
Select one element in the ComboBox so it colapses

Close the form by a CommandButton
ThisForm.Release()

Everything OK

One combobox that is in the calling Form MyFormMain is empty to
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top