PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Updating a form that comes from a Query/table
Updating a form that comes from a Query/table
Débuté par Simon Phillips, 13 aoû. 2019 10:50 - 1 réponse
Posté le 13 août 2019 - 10:50
This is probably very simple but I can't find an automatic way to do it.

I have a table which is linked to a query. This works fine. However, if I then select a row and call a window to modify it, the fields in the modify window were blank. So I then changed the form to be linked to the query instead which displayed the selected row correctly and saved on return to the calling procedure However once refreshed, the record reverted back to it's old state. I am presuming this is because the query in memory was updated but not the file it's querying.

So is there a easy way to update the file itself from the query or is this a manual task?

Again please bear with me as this is a completely new environment for me!

Simon
Membre enregistré
31 messages
Posté le 15 août 2019 - 16:36
Your analysis of the problem is correct and there are several viable approaches to this:
You could populate the table with the original file and use an HFilter to only show the desired records. The modify window would then automatically contain the desired data and your update would work.
If you prefer to use the query then your modify window must retrieve its data from the original file by seeking on its key.
If you want to save hours, if not weeks of your learning time then I would highly recommend Glen Rathke's training materials. You can learn about them at https://www.wxtraining.net. In spite of a restricted budget, this is the approach that I took when starting with WinDev and I have never regretted it!

--
Garry