Lazarus
Programming => General => Topic started by: Medhome on August 07, 2022, 04:23:32 pm
-
Hi all,
I wrote a procedure sumField in form1 and I want to replace the last procedure corresponding to afterOpen event in datamodule of my application.
Can I connect the AfterOpen event on the DataModule from Form1? .
Regards
Med
Nb:
I did datamod.dataset.afteropen := sumfield in form1 No success.
-
Data module is just another UNIT, include the unit name in the list of units in your USES list of where you need to access it from.
-
The AfterOpen event is fired in the datamodule not in form1!
-
I did datamod.dataset.afteropen := sumfield in form1 No success.
try: datamod.dataset.afteropen := @form1.sumfield
-
HI bpranoto,
That works.
@sumfield works also cause we are in form1 .
Thank you.
Med