Lock drop down value if checkbox is NOT checked

rplohocky

Registered User.
Local time
Yesterday, 18:27
Joined
Apr 13, 2017
Messages
45
Hello,
I wrote this code but doesn't seem to work. I have a combobox (Combo565) that has a drop down list. I also have a check box (LetterRecieved) on a form. I am trying to lock down the combo box when value "3. Oracle Order Sent" and the check box is NOT checked. Once the user receives the letter they would check the check box and the combo box would unlock and allow the user to continue with the next steps.
Here's what I have so far. Any thoughts?

Code:
If Me.Combo565 = "3. Oracle Order Sent" And Me.LetterRecieved = False Then
Me.Combo565.Locked = True
Else
Me.Combo565.Locked = False
End If
 
Try Me!Combo565.Locked
By the way - you have miss-spelt "Received". A trivial point, but one that could cause problems for future maintenance.
 
...you have miss-spelt "Received". A trivial point, but one that could cause problems for future maintenance...

Not really trivial, if the Control name is actually LetterReceived rather than LetterRecieved...and could, in fact, be the cause of the code not working!

Linq ;0)>
 
Any thoughts?
Yes. You have described what you are trying to do, and you have stated it is not working, but that is not enough info. What is not working? What is the exact nature of the failure?

1) What is that action you take? 2) What is the outcome of that action that is evidence of the failure?

Does it fail when you nav to a new record? Does it fail when you click the LetterRecieved checkbox? See how different our response might be depending on those facts?

hth
Mark
 

Users who are viewing this thread

Back
Top Bottom