Try this for the macroexpansion part:
&pfname..&pbtnname..visible = .F.
Or you can issue RETURN .F. in the Form.Init(), so the form will not be created.
HTH.
>Hi,
>
>In my program, I want to make certain functions accessible to certain users based on their security level.
>
>I have taken care of defining this as a table. Now when it comes to the form, how do I implement this?
>
>What I am trying to do is have one program that looks like this and call it in the INIT event of each form.
>
><<
>
>Parameters pfname, pbtnname
>
>if parameters()<1 or parameters()<2
> return
>endif
>
>&pfname.&pbtnname.visible = .F.
>
>
>>>
>
>
>But FoxPro translates the line
>&pfname.&pbtnname.visible = .F.
>as
>FormAControlAVisible = .F., for FormA & ControlA
>
>I also tried to use Evaluate as:
>
>lform = pfname + "." + pbtnname + ".visible = .F."
>Evaluate(lform)
>
>Am I making this very complicated? How can I accomplish this? Do I have to code this in the INIT event of each form?
>
>Thank you.
>
>Ria