Hello All!
I have some code that is below!
Code:
Public Function DegreeChecker(AGShrs As Integer, ASBAhrs As Integer, ASCJhrs As Integer, AAhrs As Integer) As String
Dim Degree As String
If ((AGShrs = 0) And (ASBAhrs = 0)) Then
Degree = "ASBA"
ElseIf ((AGShrs = 0) And (ASCJhrs = 0)) Then
Degree = "ASCJ"
ElseIf (AGShrs = 0) Then
Degree = "AGS"
ElseIf (AAhrs = 0) Then
Degree = "AA"
Else
Degree = "Potential"
End If
DegreeChecker = Degree
End Function
The problem is, the information that is populating the query which is running this code may not be there. As in some of the fields, AA, AGS, ASBA, and ASCJ might be left blank. Unless these four fields are populated by something, it returns #Error instead of the specified number.
My question is then this: Is there a way to say, If variable is blank, ignore and continue on to check if the next thing is 0, or if none are 0, state Potential.
Also on a side note. The information in this query is to be exported out to excel to be used as a Mail Merge file. I don't know anything about mail merge so if someone who knows can point me towards a website or set of instructions for this.
Thanks!
Imintrouble
(Im in trouble, your in trouble, We're all in trouble)