Locking Text Box - based upon Combo Box Selection

N

newtoaccess

I am doing something wrong....below is what I've been trying to make
work. I want the combo box selection: "Good","Worn", "Broken", "Out
for Repair" - to enable or disable the (Describe Status) text box. If
the condition is good, there would be no need to input data in the
(Describe Status) txt box.

Private Sub Condition_Status_AfterUpdate()
Select Case Me.[Condition_Status].Enable

Case "Good"
Me.[Describe_Status].Enable = False

Case "Worn"
Me.[Describe_Status].Enable = False

Case "Broken"
Me.[Describe_Status].Enable = True

Case "Out for Repair"
Me.[Describe_Status].Enable = True
End Select

End Sub

Any help would be appreciated,

John
 
J

Jeff Boyce

John

It sounds like you want to set the .Enable status of your [Describe_Status]
control.

If so, why are you testing the .Enable status of the [Condition_Status]
control? I would think you'd want to test the value that's been selected
....

Good luck

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
N

newtoaccess

The combo box is the "Condition Status" reference, I've tried the
alternative - but I have yet to get to work. I want the combo box
"Condition Status" - "Good","Worn", "Broken", "Out for Repair" - to
enable or disable the (Describe Status) text box based upon the
status. If it is Good or Worn I want the "Describe Status" text box
to be locked or disabled - broken or Out for repair...enabled. Could
you lead be down the right track, I've went off course and have yet to
find the correct way.

Thanks,

John
 
J

Jeff Boyce

John

Please re-read my response and check your expression.

You are NOT looking at the value of the combobox, but at the value of its
..Enabled property.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top