1
I have a DBGrid
which searches several records recorded in the table just when the form is opened, this should show exactly everything that has saved in the table.
There are some fields calculated with the event OnCalcFields
that soon when opening the form already return and show the calculated value in the columns, and this can not happen.
I intend that after showing the recorded data in the table, it would only perform the event calculation OnCalcFields
when the user clicked on a button, or pressed the key Enter.
Can anyone say if you have how to do it? If yes you could give an example or a direction of how to do it?
Puts in the
OnKeyPress
the algorithm in theOnCalcFiends
, which only calculates if it is [Enter]– David
I tried that way, but it didn’t work, it loses field references
– Felipe Neiva
Create a control variable in the form, change its value to true when the user clicks on that button, and in Oncalcfields, start with "if not control then Exit;"
– Ricardo Alves Carvalho