PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [Windev 9] NO selection in table
[Windev 9] NO selection in table
Débuté par Sam, 08 nov. 2007 16:32 - 1 réponse
Posté le 08 novembre 2007 - 16:32
Hi all,

I created a table on a form that is linked to a query. Depending on the selection of that table (row selected), another table is filled (also based on a query).

For example, I want to see all the records for the selected customer in a table on the same form.

The second query can contain much records (and takes a while to load).

When the screen initialises, the first record of that first table is ALWAYS selected by default. Result: the first big query is also performed.

Even if I code "Table1 = -1" or "TableSelectMinus(Table1,-1)" it always hit the "Row Selected" event.

How can I stop this of resolve this problem?

Thanks in advance!

Sam
Posté le 08 novembre 2007 - 17:45
G'day Sam

You could declare a first use variable to control the first row select function

OkToRunCode is boolean = false

set up the table

In the row select code of the table

>

If OkToRunTable = false

  OkToRunTable = true

else

  row select code

end



This will stop it running in the very first instance but it will run every time after that

Regards

Al