Forum > General

datamodule

(1/1)

Medhome:
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.

 

jamie:
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.

Medhome:
The AfterOpen event  is fired in the datamodule not in form1! 

bpranoto:

--- Quote from: Medhome on August 07, 2022, 04:23:32 pm ---I did datamod.dataset.afteropen := sumfield  in form1   No success.

--- End quote ---

try: datamod.dataset.afteropen := @form1.sumfield

Medhome:
HI bpranoto,

   That works.

     @sumfield   works also cause we are in form1 .

Thank you.

Med

Navigation

[0] Message Index

Go to full version