Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

MS Access Form lock control

[I have a form (I inherited) with about a kajilion databound controls on it

There is a Check Box that I need to lock based on the value of a different datafield in my record source.

So

chkSuggestJunk needs to be locked when datafield  [Submit Stage] = 'Reject Submit'

This is the image of the checkbox properties

User generated image
ASKER CERTIFIED SOLUTION
Avatar of jjnet123
jjnet123

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
Avatar of Jim Horn
The code for this is simple...

If Me![Sumbit Range] = "Reject Submit" then
   Me.chkSuggestJunk.Locked = True
Else
   Me.chkSuggestJunk.Locked = False
End If

The trick is .. how many places will you need to execute it?  Examples are ... Form.Open, Form.BeforeInsert, [Submit Change].AfterUpdate, etc.
Avatar of Larry Brister

ASKER

Excellent

Watch for followup