>You assigned the init to receive a parameter. When no parameters are passed the routine will assume the parameter value is .F., thereform pcount() = 1
>Test for a valid parameter instead. something like
>if VARTYPE("lcstkno") # "C"
> return .F.
>endif
If you want to do it in the load, you may use this approach. Declare lcstkno as Private variable in the calling procedure/form (if it's an application parameter, just use parameter statement instead of lparameter), when you can do in the Form's Load:
if vartype(lcstkno)<>"C"
return .f.
else
return dodefault()
endif
HTH
If it's not broken, fix it until it is.
My Blog