Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Impose Security levels
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00711131
Message ID:
00711139
Views:
11
Try this for the macroexpansion part:
*& Notice the 2 periods.
&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
Previous
Reply
Map
View

Click here to load this message in the networking platform