Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to controls

Status
Not open for further replies.

litesleeper

Technical User
Sep 20, 2003
3
0
0
AE
i had posted a thread earlier regarding limiting access to
screens. Is it possible for me to limit access to individual controls within the screen. For example the screen shows the following information:
1. Receipts
2. Payments
3. Bank receipts JV
4. Bank Vouchers JV
I've already created module groups for every user, which consists of the screens they have access to. But in this case, i was not able to do so, because all the options open in the same screen.
thx


 
The simple answer is yes, but it's really complicated by "how" you want to limit access. Do you want to make them non-visible? Do you want them visible but "read-only"? Are you doing the screens all through code? Are you doing this through the Screen Designer? Are you using GenScrnX? Is this FP DOS or FP Windows?

Rick
 
This is FP 2.5 based on DOS.
About how to limit access, id like to make them non-visible, for users who do not have access.
About the screens, i really have no idea, cause this is the first time im using Foxpro, and the screens were designed as early as 1992 by another programmer.
All i know is that each screen has a module no. which along with the description forms the index. There are two tables with the foll fields

1. module no. modulegroup creatdate userid
2. module no. module description

under SYSTEM MANAGER'S UTITLITES i just created module groups and assigned each module group to the respective user who has been assigned a password.
 
Defining each and every user (or group of users) separately as to which screens they are allowed into is one way to approach this screen access issue, but it would not be my first choice. Maintenance for that type of system is extremely time-consuming and tedious - especially as the application evolves over time.

But as to your specific question.....

Each control is defined within the application and has a name/variable assigned to it. Plus all GET's whether an entry field or a button, etc. control can be either ENABLED or DISABLED.

An example:
IF mcUserPriv # TopLevel
* --- Enable the GET ---
SHOW GET mnReason DISABLE
ELSE
* --- Disable the GET ---
SHOW GET mnReason ENABLE
ENDIF

Look at Foxpro's Help file for SHOW GET

When you create the screen you can do so with the specific GET(s) initially DISABLED and then put code like this into the Startup Snippet.

It would be tedious to do this for each and every GET within a complex screen, but it can be done.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top