Page 1 of 1

Combobox

Posted: Thu May 11, 2017 12:20 pm
by Mario Mansilla
Hola Amigos :
necesito saber si es posible lograr el comportamiento del Combo_1 igual que el Combo_2 cuando ejecuto el boton Inicio . Es decir que al realizar Main.Combo_1.Value := 0 no muestre ningun registro .

Saludos
Mario Rafael Mansilla

Hello friends :
I need to know if it is possible to achieve the behavior of Combo_1 just like Combo_2 when I execute the Start button. That is to say that when performing Main.Combo_1.Value: = 0 does not show any record.

regards
Mario Rafael Mansilla

Re: Combobox

Posted: Thu May 11, 2017 1:00 pm
by Marin
Hi, Mario,

I am writing to you at prima vista being not absolutely sure that I understood right your question.

As I see you have two kinds of underlying data for both COMBOs - a database (data bound) for Combo_1 and an array for Combo_2.

If I were in your situation, then I would try to test as first step these two approaches.

1. Before assigning zeroes in Button_1 with
ACTION ( Main.Combo_1.Value := 0 , Main.Combo_2.Value := 0 )
why not try to move the record pointer past EOF(), i.e.:
GO BOTTOM
SKIP +1
Thus, the record value for the Combo_1 should become undefined, and maybe the Combo_1 would display an empty row. Or the program will crash, I don't know.

2. Change the data type for Combo_1 by first transferring the records from the database to an array and declare that array as data source for the Combo_1.
This way the command ACTION ( Main.Combo_1.Value := 0 , Main.Combo_2.Value := 0 ) should behave in a similar manner for both COMBOs.

Kind regards,
Marin