Solved

Unlock controls based on user type when form opens

Posted on 2011-09-09
6
192 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
  • 3
  • 3
6 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
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 119

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

by:Rey Obrero
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Export  Access Query To Excell 16 47
Newbie needs help printing from a form. 10 20
Is it possible to reset DSum? 12 43
Prevent use of Microsoft Office application 9 54
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now