Topic: Tablegrid, sub-grids and sql search

Hello Dmitry,

In a project i have just started, Form1 has 1 main Tablegrid, 2 sub-Tablegrids and 2 incremental sql-searches.
In  the following example, when I start, Form1 looks like this (screenshot1).
I use an incremental sql-search on Tablegrid1 which retrieves 3 rows into Tablegrid3 (screenshot2).
I then use the second incremental sql-search on Tablegrid3 which reduces the rows from 3 rows to 2 rows (screenshot3).
If I want to try a different search on Tablegrid3, I delete my criteria but instead of looking like (screenshot2) which is what I expected, it now looks like (screenshot4), showing ALL rows.
To make it look like (screenshot2) again, I need to go back and re-highlight or re-enter the selection in Tablegrid1.
I think there is something that I've not set up correctly but I cannot find it.  Can you help?
I have enclosed a copy of the project and I am using Version 1.50.

Thanks,
Derek.

Post's attachments

Attachment icon wmc dmitry.zip 1.03 mb, 500 downloads since 2015-04-06 

Re: Tablegrid, sub-grids and sql search

Hello,


Fixed SQL query for Button14

select
strftime('%d-%m-%Y',a.compdate),
b.class,
d.name,
a.exhibit,
a.judge,
c.place,
a.id
from competitions a
left outer join members d on a.id_members = d.id
left outer join classes b on a.id_classes = b.id
left outer join placement c on a.id_placement = c.id
where
(
(a.compdate like '%{edit2}%') or
(b.class like '%{edit2}%') or
(a.exhibit like '%{edit2}%') or
(a.judge like '%{edit2}%') or
(c.place like '%{edit2}%')
) AND (a.id_members={TableGrid1});
Dmitry.

Re: Tablegrid, sub-grids and sql search

Hello Dmitry.
I didn't realise you could actually reference a tablegrid like that as part of your sql query search.
Thanks.
Derek.

Re: Tablegrid, sub-grids and sql search

Here you can get more info
http://myvisualdatabase.com/help_en/com … n_sql.html

Dmitry.