Grayed Out Text & combo box

doran_doran

Registered User.
Local time
Today, 04:27
Joined
Aug 15, 2002
Messages
349
1. Combo box 1 = "BillingStructure" should always be enable.
2. Combo box 2 = "Fee Waived" should be grayed out all the time only if the user pick "Fee Waived" from combo box 1.
3. if user pick "fee waived" from billingstructure combo box then fee waived combo box should be enable.
4. There are also some text associated with this, but i guess i can use the same method.

any help will be appreciated.

==================================
Private Sub BillingStructure_Change()
If Me!BillingStructure = "Fee Waived" Then
Me!Waiver_Reason.Enable = True
Me!Waiver_Reason.Locked = False
Else
Me!Waiver_Reason.Enable = False
Me!Waiver_Reason.Locked = True
End If
End Sub

 
If this code is not working, then this will be due to the combo box probably having a number as the bound column. If this is the case, you will need to change your code to the following (or equivalent)

Code:
Private Sub BillingStructure_Change() 
with me
If .BillingStructure.column(1) = "Fee Waived" Then 
.Waiver_Reason.Enable = True 
.Waiver_Reason.Locked = False 
.FeeWaived.enabled = true
Else 
.Waiver_Reason.Enable = False 
.Waiver_Reason.Locked = True 
.FeeWaived.enabled = False
End If 
end with
End Sub
 
more info...

Do I need to set the property to following for both combo box.

Enable = Yes
Lock = No

As of now, it's not working. Please suggest.

Dianna Jamil
 
Did Mark's demo help?
The combo does not to be locked if you have set enabled = False as this will grey out the combo anyway. Your original coding is ok - did it disable the textbox Waiver_Reason - if it did , then you just need to add the enabled = false to the combo as well.
If it does not work, then you are probably looking at the wrong combo column.
 

Users who are viewing this thread

Back
Top Bottom