Link to home
Start Free TrialLog in
Avatar of Sandra Smith
Sandra SmithFlag for United States of America

asked on

Unlock controls based on user type when form opens

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?
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

<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 ?
Avatar of Sandra Smith

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Should this be a function that returns a value to a global variable?
post the Procedure that you are talking about ..

where is this pocedure, in a regular module ?
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