Solved

Unlock controls based on user type when form opens

Posted on 2011-09-09
6
209 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

739 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