Hi Emad,
Simple. Define a local BYTE variable and set it to True in the When Selected embed. i.e.
AlreadySelected BYTE(0)
CASE EVENT()
OF EVENT:Selected
IF NOT AlreadySelected
...
AlreadySelected = True
END
Does it fire again when you press the OK button? If so, the reason for that is because an EVENT:Accepted is sent to ALL the controls for Validation purposes. To prevent code to execute during that phase which is called the ACCEPTALL phase, do the following :
IF NOT 0{PROP:AcceptAll}
...
END
Regards