Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 7 Monaten
Letzter Beitrag:
vor 6 Monaten, 4 Wochen
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:
HSeek(RBL_BRES,TOUR_DATE_TIME,Today())
TableDisplay(TABLE_Reservations,taCurrentFirst)
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?
Thanks
Garry

Antworten:

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
Guenter...
The code on my Add Button is:
Open(WIN_Res_Dtl)
TableDisplay(TABLE_Reservations,taCurrentFirst)

The code on my Edit Button is:
Open(WIN_Res_Dtl,TABLE_Reservations)
TableDisplay(TABLE_Reservations,taCurrentRecord)

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

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

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.
Garry

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

Regards,
José Antonio.

von Jose Antonio Garrido - am 22.03.2017 01:28
Hi

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()



regards
allard

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.