Hi, I have a form in which I want to simplify data entry. Depending on what is entered in the subject text box I would like the MT code to be entered automatically. This is the code I am trying to use. Thanks I'm new : )
I know there is a problem with the or but I don't know how else to write this statement and I have a long list of Subjects for each MT Code. Should I use a Case statement?
Private Sub Master_Tutor_Code_GotFocus()
If Subject = "IS" Or "MATH" Then
Master_Tutor_Code = "A"
ElseIF Subject = "CHEM" or "BIO" or "PHY" Then
Master_Tutor_Code = "B"
End If
End Sub
I know there is a problem with the or but I don't know how else to write this statement and I have a long list of Subjects for each MT Code. Should I use a Case statement?
Private Sub Master_Tutor_Code_GotFocus()
If Subject = "IS" Or "MATH" Then
Master_Tutor_Code = "A"
ElseIF Subject = "CHEM" or "BIO" or "PHY" Then
Master_Tutor_Code = "B"
End If
End Sub