> Hi,
>
> I have developed a Menu using create menu. It is working fine. I want to block some users from accessing some items of menu.
>
> for example:
>
> Main Menu
> .....Pay Roll
> ..........Employee Master
> ..........Salary Preparation
> ..........Bonus Calculation
> ..........Attendance Entry
> ..........------------------
> ------
>
> There are two users. Admin & User. I want to block Bonus calculation to User. Is there any way? How I can use SKIP FOR in this condition?
>
>
> Prasant
Normally, when you create a table to hold the allowed users, it is something like this:
Login.Dbf Structure
LoginName c(10) && A nickname for easy login
Password c(10) && The encrypted password
FullName c(40) && The complete name of the user
JobPos c(40) && Job Position
IsAdmin L && Logical True or False, True as Admin, False as Plain Users
Now in your module where you grant users an access to your app, you immediately decide on the level of that specific user. The simplest is creating two levels as shown above which can be achieved by a logical field. So you can save a specific user as an Admin or not. Then when your user login successfuly, you can immediately get the access level and place the value in a _Screen variable like this:
_Screen.AddObject("oIsAdmin",login.isadmin)
So on your menu item, you can now
SKIP FOR !_screen.IsadminJun Tangunan
http://weblogs.foxite.com/sandstorm36/