Hi everybody
i have a simply form based on a custom table with few fields. On the form is a button "Load Data": this run a dataport that load data into my cust table. This works fine: the table is correctly populated with my data. The problem is that the form still remain empty. Only when i call a refresh command by menu or pressing CTRL+ALT+F5, the form display me the data.
What happens?
I tried with COMMIT or CurrForm.UPDATE too, at the end of dataport run, but this don't work.
Please, can anyone help me?
Best regards
gicif
0
Comments
try doing in the OnPush finction of your button the following:
DATAPORT.RUNMODAL(......);
CurrForm.FIND('-');
and you will be ok... I have tried it on an 4.0 SP3 version...
Know that if you try DATAPORT.RUN, then the code below it doesn't wait for the dataport to finish and the execute the remaining code, but it continues executing the code after the dataport.run regardless you have executed the dataport.
The runmodal causes the code to wait, and when the execution of the dataport is finished, it continues to the FIND('-') line of code...
Arhontis
https://forum.mibuso.com/search
Many thanks, Arhontis, for your precious support.
gicif
ps
for your curiosity, i'm with 5.0 and CurrForm.FIND('-') isn't supported.
It's enough the first statement DATAPORT.RUNMODAL..... and it's the key to solving my problem.
Haven't worked on 5.0 yet... not in greece...
Arhontis
https://forum.mibuso.com/search
Many thanks again, Arhontis.
Regards
gicif
My mistake!!! wrong copy/paste lol...
DATAPORT.RUNMODAL(......);
Rec.FIND('-');
or
Rec.FINDFIRST;
or just
FINDFIRST;
(the rec variable on a form can me omitted...)
Arhontis
https://forum.mibuso.com/search