D
David Ehrenreich
I have this code I made that checks a feild and if the
feild contains certain text it will enter data into
another feild automatically. The way I did it seems to
big, so if someone can help me do the same thing, but with
less code.
Here Goes
Private Sub FinishedTest_Change()
If (FinishedTest) = "none" Then
Me.Mail = "none"
LoginProctor.SetFocus
Else
If (FinishedTest) = "Professor Pickup" Then
Me.Mail = "PU"
LoginProctor.SetFocus
Else
If (FinishedTest) = "File Test and Mail Answer"
Then
Mail.SetFocus
Else
If (FinishedTest) = "Mail Test and Answer"
Then
If (Course) = "bpa254" Then
Me.Mail = "Crrs 205"
Else
If (Course) = "bpa111" Then
Me.Mail = "Crrs 205"
Else
If (Course) = "bpa142" Then
Me.Mail = "Crrs 205"
Mail.SetFocus
Else
If (Course) = "bpa162" Then
Me.Mail = "Crrs 205"
Else
If (Course) = "eng111" Then
Me.Mail = "Hum 102"
Else
If (Course) = "csi113" Then
Me.Mail = "Crrs 224"
Else
If (Course) = "his111" Then
Me.Mail = "Crrs 317"
Else
If (Course) = "his211" Then
Me.Mail = "Crrs 317"
Else
If (Course) = "phs109" Then
Me.Mail = "Drgn 238"
Else
If (Course) = "mat011" Then
Me.Mail = "Math"
Else
If (Course) = "bpa010" Then
Me.Mail = "Math"
Else
If (Course) = "bpa012" Then
Me.Mail = "Math"
Else
If (Course) = "hea111" Then
Me.Mail = "PE 208"
Else
If (Course) = "hea114" Then
Me.Mail = "PE 208"
Else
If (Course) = "hea150" Then
Me.Mail = "PE 208"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
feild contains certain text it will enter data into
another feild automatically. The way I did it seems to
big, so if someone can help me do the same thing, but with
less code.
Here Goes
Private Sub FinishedTest_Change()
If (FinishedTest) = "none" Then
Me.Mail = "none"
LoginProctor.SetFocus
Else
If (FinishedTest) = "Professor Pickup" Then
Me.Mail = "PU"
LoginProctor.SetFocus
Else
If (FinishedTest) = "File Test and Mail Answer"
Then
Mail.SetFocus
Else
If (FinishedTest) = "Mail Test and Answer"
Then
If (Course) = "bpa254" Then
Me.Mail = "Crrs 205"
Else
If (Course) = "bpa111" Then
Me.Mail = "Crrs 205"
Else
If (Course) = "bpa142" Then
Me.Mail = "Crrs 205"
Mail.SetFocus
Else
If (Course) = "bpa162" Then
Me.Mail = "Crrs 205"
Else
If (Course) = "eng111" Then
Me.Mail = "Hum 102"
Else
If (Course) = "csi113" Then
Me.Mail = "Crrs 224"
Else
If (Course) = "his111" Then
Me.Mail = "Crrs 317"
Else
If (Course) = "his211" Then
Me.Mail = "Crrs 317"
Else
If (Course) = "phs109" Then
Me.Mail = "Drgn 238"
Else
If (Course) = "mat011" Then
Me.Mail = "Math"
Else
If (Course) = "bpa010" Then
Me.Mail = "Math"
Else
If (Course) = "bpa012" Then
Me.Mail = "Math"
Else
If (Course) = "hea111" Then
Me.Mail = "PE 208"
Else
If (Course) = "hea114" Then
Me.Mail = "PE 208"
Else
If (Course) = "hea150" Then
Me.Mail = "PE 208"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub