Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a text box 1

Status
Not open for further replies.

dabones99

Technical User
Oct 4, 2002
20
US
I have a form on which I have a few combo boxes. What I want to do is display different text in a textbox depending on the criteria in the combo boxes. However, when I put the code in the AfterUpdate event of the combo it gives me an error say something about Focus. The code is as follows:

' If cboMath1PF.Text = "N" Then
' txtMathSkills.Text = "No Active Record"
' ElseIf cboMath1PF.Text = "P" And cboMath2PF.Text = "F" Then
' txtMathSkills.Text = "Failed"
' ElseIf cboMath1PF.Text = "F" And cboMath2PF.Text = "P" Then
' txtMathSkills.Text = "Failed"
' ElseIf cboMath1PF.Text = "P" And cboMath2PF.Text = "P"
' End If

Can someone please give me some insight?

Thnkas in advance.
 
In order to reference the text property of a control, the control must have focus. This should work:

Code:
    If cboMath1PF = "N" Then
        txtMathSkills = "No Active Record"
    .
    .
    .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top