Solved

Unlock controls based on user type when form opens

Posted on 2011-09-09
6
206 Views
Last Modified: 2012-06-21
I have an Access 2003 form that records updates and also allows entry of time, but time entry is only availabe is the person's work type is 'DEV'.  I have a procedure that checks the perons's type and if it is DEV, then when the form Opens, I want the time controls unlocked.  but it seesm I have a problem in that the code does not run (i get null values) so I think it is a resolutionissue as to which event should I put the procedure to run to unlock when teh form opens?
0
Comment
Question by:ssmith94015
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36511433
<I want the time controls unlocked.>

what time controls are talking about ?

are these textboxes from the form ?

<I have a procedure that checks the perons's type and if it is DEV>
how do you apply the result to you unlocked the time controls ?
0
 

Author Comment

by:ssmith94015
ID: 36511495
The time control are where the developers enter the project they are working on and the amount of time they spent on it.  I would ideally like these text boxes available for data entry when the form opens, checks the user id and determines that it is a develoer, otherwise, these fields should remain disabled.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 36511658

are you assigning the result of  "procedure that checks the perons's type and if it is DEV" to a global variable ?

lets assume you assigned the value to a global string  gVariableDev

in the open or load event of the form

me.textTimer.enabled= (gVariableDev="DEV")
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:ssmith94015
ID: 36511736
Should this be a function that returns a value to a global variable?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36511787
post the Procedure that you are talking about ..

where is this pocedure, in a regular module ?
0
 

Author Closing Comment

by:ssmith94015
ID: 36511803
Actually, this gave me an idea that satisifed what I needed.  I assigned the global value on the calling form, which set the value I needed on the called form and it is happy little form now.  Does exactly what I want.

Sandra
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question