Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 9 Jahren
Letzter Beitrag:
vor 9 Jahren
Beteiligte Autoren:
christoph, Milton, Frans, Dan M

How do you "select" the record you just created in a table?

Startbeitrag von Dan M am 03.07.2009 13:37

I have a table of companies.

there is a button to create a new company which opens a new window to create the company.

After saving the new company, I want to return to the table but be located on the company record which was just created.

In the button that calls the window to create the new company I have tried ...

TableDisplay(TABLE_QRY_Companies, taCurrentRecord)
TableDisplay(TABLE_QRY_Companies, taCurrentSelection)

The button code is (which call the window to create the new company is ...

TableDisplay(TABLE_QRY_Companies, taCurrentSelection)

How do I know what the current record or selection is?

Do I need to return the current record (the record that was just created) to the table?

If so, how do I do that?

Any help would be greatly appreciated !!



Hello Dan,

I think that the code you use is correct.
There could be one thing:
In the WIN_Quick_Create_Company there is a 'independent hyperfile context' selection in the detais Tab. This should be of.

Otherwise try a recompiling the project.

von Frans - am 03.07.2009 19:50

If I am reading your notes correctly then the company you created will be the last record in the table if you use the primary index key. Therefore you could open the table and do a HreadLast statement using the primary index.


von Milton - am 03.07.2009 21:51
Hi Dan,

i think it is impossibel to do this with one command.

TableDisplay(TABLE_QRY_Companies, taStart) - get the new record(s) in the table.

Then you can make a automatic search :

HReadSeek(File,BrowsKey,Search) - search can come back from Window

I hope also to find a better solution.


von christoph - am 04.07.2009 11:51
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.