I searched Google and this forum for the answer, but I didn't find it.
I have a combo box 'cmbDisposition' in a subform 'LeadInformationSubform'.
When the user choses "Won" from the combo box, I want a button 'btnMoreInfo' in the mainform 'AllRecordsSearch' to be enabled. If the combo box has anything else but "Won", I want the button disabled.
I put a button in the subform to see if it would work....just to try it. I tried this code, but it didnt work:
I also tried this when the button is on the main form like I want. But this didnt work:
I have a combo box 'cmbDisposition' in a subform 'LeadInformationSubform'.
When the user choses "Won" from the combo box, I want a button 'btnMoreInfo' in the mainform 'AllRecordsSearch' to be enabled. If the combo box has anything else but "Won", I want the button disabled.
I put a button in the subform to see if it would work....just to try it. I tried this code, but it didnt work:
Code:
Private Sub Form_Current()
If (Me.cmbDisposition.Value = "Won") Then
Me.btnMoreInfo.Enabled = True
Else
Me.btnMoreInfo.Enabled = False
End If
End Sub
I also tried this when the button is on the main form like I want. But this didnt work:
Code:
Private Sub Form_Current()
If (Me.cmbDisposition.Value = "Won") Then
Forms!AllRecordsSearch!btnMoreInfo.Enabled = True
Else
Forms!AllRecordsSearch!btnMoreInfo.Enabled = False
End If
End Sub