PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → Always to the first record in query
Always to the first record in query
Iniciado por Henk Ouwejan, 09,ago. 2016 22:20 - 1 respuesta
Publicado el 09,agosto 2016 - 22:20
Hi all,

I have created an table, based on a query, in a vision page. When calling this query bij using PageDialog always the first record is selected. I like to select the current record.

Using the next code by init. the page (server code)

// Position on the current record
TableDisplay(TABLE_QRY_products_brand,taCurrentRecord)

Do I forgot something?
Publicado el 10,agosto 2016 - 16:42
Hi Henk

When you load a table, there is no currentrecord.
currentrecord means the currently selected line in the TABLE CONTROL...
Not where the cursor is in the dataset before loading the table

So, for what you want to do, you need to first do a tableseek of your
'current' record, then do a tableselectplus of the line found

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 8/9/2016 à 2:20 PM, Henk Ouwejan a écrit :
Hi all,

I have created an table, based on a query, in a vision page. When
calling this query bij using PageDialog always the first record is
selected. I like to select the current record.

Using the next code by init. the page (server code)

// Position on the current record
TableDisplay(TABLE_QRY_products_brand,taCurrentRecord)

Do I forgot something?