>thanks for the replies.
>
>I put the code in the Init.
>after I switched to Activate, it's okay.
>
>regards,
>
>Jerry
If you want to do some checks when a form loads and if they don't pass then close the form without displaying it, you can put in the form's init():
IF !mycondition
return .F.
ENDIF
Once the form's init finishes running (all objects are instantiated) then you have to use THISFORM.Release() to close the form. You can also check if it's ok to close the form or not using the form's QueryUnLoad()...
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"