Comparing data and locking a field on a form (1 Viewer)


Registered User.
Local time
Today, 00:43
Jul 10, 2019
Hello, I have one more issue and its a confusing one. My boss is wanting a field in a separate subform to determine whether or not you can enter data into another field in another subform.

If a user puts an "X" in the "Monday" field of the "SAChallenges" subform then the user cannot enter a time into the "Monday" field in the "StartTime" subform. I am racking my brain, do I use a DLookup?

Another challenge that is presented here is that I am also matching "Standard Action" in the "SAChallenges" subform against the "StartTimeAction" in the "StartTime" subform. Perhaps if I make this a little more logical with an If statement.

If "SAChallenges".StandardAction = "StartTime".StartTimeAction AND
"SAChallenges".Monday = "X" Then
"StartTime".Monday."Locked" where "StartTime".StartTimeAction = "SAChallenges".StandardAction​

I know that is not the actual code to use, but I thought it would help explain what is needed.

I would probably want to lock the field after entering the "X", maybe on lost focus for the Monday field in the SAChallenges subform.


Local time
Yesterday, 23:43
Mar 9, 2014
Yes, DLookup might be needed. Can use DLookup in Conditional Formatting rule.

If you want to provide db for analysis, follow instructions at bottom of my post.

Users who are viewing this thread

Top Bottom