Topic: combobox and filters

Hi,
how can i set a filter which every time I press a combobox that this will have only specify values ?

I send you an example because it is difficult to explain it.


in the form frmypothesi there are some comboboxes.
what i want to do is every time i press the combobox2 it should have the values from the table stoixeia showing all the lastnames if idiotita is equal to 'alfa'

i send you my example

Thank you in advance

Post's attachments

Attachment icon example.zip 325.22 kb, 430 downloads since 2016-03-31 

Re: combobox and filters

Hello V_pozidis,
If I understand your problem correctly, you only need to use the 'parent combo-box' feature and do not need to write any script.
Instead of changing your example, it is quicker for me to attach an old example of mine.  Just look at the screen shot and then change your own project in the same way.
However, I think you might need to amend your data tables and your forms slightly.
Hope this helps,
Derek.

Post's attachments

Attachment icon cars.zip 429 kb, 503 downloads since 2016-03-31 

3 (edited by v_pozidis 2016-03-31 18:47:15)

Re: combobox and filters

No it is not what I want to do.
I have one table <stoixeia> with the record : lastname, and two relationships, idiotita and names.
with the record <idiotita> i  give the type of the client (let's say , good, bad, very bad...)

In the table <ypothesi> i use the record lastname three times. 
What I need to do is : pressing the button in the lastname1 it should show us in the combobox the client with the type <good>
pressing the button in the lastname2 the combobox should show us the type of client <bad>
and pressing the third button it shoud show us the <very bad> clients
How can i do that ?
I think there must be an filter to insert in the combobox the <types>
I don't know if the FILTER in the obhect inspector can help us. I do not know what this does.
see the attached file

Post's attachments

Attachment icon filter.jpg 24.66 kb, 256 downloads since 2016-03-31