Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr, 2 Monaten
Letzter Beitrag:
vor 1 Jahr, 2 Monaten
Beteiligte Autoren:
Garry Allen, Allard, Jose Antonio Garrido, GuenterP, Fabrice Harari

strange behaviour on clicking button

Startbeitrag von Garry Allen am 21.03.2017 16:50

I have a table on my first screen which shows reservations. It also has buttons for Add, Modify, etc and everything works as expected.

I also have a button that goes to the current day with the code:
When it is clicked the display changes to show the reservations starting with today. So far, so good!
But now if I edit one of the records, when the Edit Window is closed the browse screen no longer shows the current record. It appears to go back to showing the entire file.

What an I missing?


Hi Gary,

the first thing you are missing is to tell us if you are talking about windev, webdev or mobile, and which version

Best regards

von Fabrice Harari - am 21.03.2017 18:04
Hi, when coming back from the Form-type window (= the Table gains Focus again) you have to select the current record there ....

von GuenterP - am 21.03.2017 18:21
Sorry Fabrice. It is WinDev V20.

von Garry Allen - am 21.03.2017 20:11
The code on my Add Button is:

The code on my Edit Button is:

The Code on my Initialization of the Reservations is
sKey is string
sTable is string = "RBL_BRES"

IF gsRes_Filter > "" THEN
sKey = HFilter(sTable,gsRes_Filter)

Then there is code on displaying a row of TABLE_Reservations:
c,r is int
r = TABLE_Reservations
... some stuff to highlight cancelled Tours
If I follow in the debugger I am on the right record until c,r is int and then it changes to the 1st record in the file (but only if the Go To Today button has been clicked at some point previously. If I disable that button everything works splendidly.

von Garry Allen - am 21.03.2017 20:34
I would delete the table control and create a new one.

José Antonio.

von Jose Antonio Garrido - am 22.03.2017 01:28

Indeed you need to select the current record youcan do that in the " filtereing the records section of the table "

click on table code and look for this section

Then add

Result filename.date > today()


von Allard - am 24.03.2017 09:10
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.