Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Substitution in VB
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00150101
Message ID:
00150418
Views:
34
Well, I am not highly experienced in VB. I know that you can accomplish what you wish to do in VB; however, I am not sure of the exact code. I know that you should cycle through each menu option in the form's menu component. You can then compare that menu caption with the field name to disable/enable as necessary.

You should probably post the example below to a VB forum to get a clear example from a VB programmer...

Regards,
Jack

>I want to disable the menus of the form i am loading depending on the permissions given to the user. I want to do it the following way, this is VB code:
>
>datPermission.Recordset.MoveFirst
>cFind = "UserID = '" & cID & "' and FormName = '" & Screen.Activeform.Name
>cForm = Screen.Activeform.Name
>
>datPermission.Recordset.FindFirst cFind
>Do While Not datPermission.Recordset.EOF
>' Here is why i want to do macro substitution:
> cMenu = datPermission.Recordset("MenuName")
>
> 'FoxPro code would look like this. How do I do it in VB
> &cForm..&cMenu..Visible = datPermission.Recordset("Allowed")
> datPermission.Recordset.FindNext cFind
>Loop
>
>I would really appriciate your help
>
>Thanks
>Abdul Ahad
Previous
Reply
Map
View

Click here to load this message in the networking platform