D
David
My question is highlighted in the code below.
Private Sub NextCmd_Click()
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(SecSSN) = True Then
MsgBox "Please Enter Student ID"
SecSSN.SetFocus
Cancel = -1
ElseIf IsNull(Fname) = True Then
MsgBox "Please Enter Your First Name"
Fname.SetFocus
Cancel = -1
ElseIf IsNull(Lname) = True Then
MsgBox "Please Enter Your Last Name"
Lname.SetFocus
Cancel = -1
ElseIf IsNull(TOS) = True Then
MsgBox "Please Select Service"
TOS.SetFocus
Cancel = -1
ElseIf (Course) = "" Then
MsgBox "Please Enter Course"
Course.SetFocus
Cancel = -1
ElseIf (TOS) = "Avid Program" Then
ElseIf IsNull(HighSchool) = True Then
MsgBox "Please Select High School"
HighSchool.SetFocus
Cancel = -1
ElseIf (TOS) = "Avid Program" Then
ElseIf IsNull(CompMath) = True Then
MsgBox "Please Select Completed Math Course"
CompMath.SetFocus
Cancel = -1
______________________________________________________________
'Question: where do I put the End if's. If I put them here a Msgbox for
Compmath and Highschool will appear if null, but it will not go to the else
statement where the close is.
________________________________________________________________
Else
DoCmd.Close
stDocName = "WelcomeFrm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
_____________________________________________________________
'Question 2 if I put them here Highschool and Compmath work fine after the
messagebox, but if course is empty and not "Avid Program" then a msgbox
appears, but does not go to the else statement for closing.
______________________________________________________________
End Sub
Any help would be great
Thank you
David
Private Sub NextCmd_Click()
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(SecSSN) = True Then
MsgBox "Please Enter Student ID"
SecSSN.SetFocus
Cancel = -1
ElseIf IsNull(Fname) = True Then
MsgBox "Please Enter Your First Name"
Fname.SetFocus
Cancel = -1
ElseIf IsNull(Lname) = True Then
MsgBox "Please Enter Your Last Name"
Lname.SetFocus
Cancel = -1
ElseIf IsNull(TOS) = True Then
MsgBox "Please Select Service"
TOS.SetFocus
Cancel = -1
ElseIf (Course) = "" Then
MsgBox "Please Enter Course"
Course.SetFocus
Cancel = -1
ElseIf (TOS) = "Avid Program" Then
ElseIf IsNull(HighSchool) = True Then
MsgBox "Please Select High School"
HighSchool.SetFocus
Cancel = -1
ElseIf (TOS) = "Avid Program" Then
ElseIf IsNull(CompMath) = True Then
MsgBox "Please Select Completed Math Course"
CompMath.SetFocus
Cancel = -1
______________________________________________________________
'Question: where do I put the End if's. If I put them here a Msgbox for
Compmath and Highschool will appear if null, but it will not go to the else
statement where the close is.
________________________________________________________________
Else
DoCmd.Close
stDocName = "WelcomeFrm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
_____________________________________________________________
'Question 2 if I put them here Highschool and Compmath work fine after the
messagebox, but if course is empty and not "Avid Program" then a msgbox
appears, but does not go to the else statement for closing.
______________________________________________________________
End Sub
Any help would be great
Thank you
David