G
Guest
I know there are about 5,000 posts about this but it's Friday and my brain
has shut off. Here is the code for the function:
Public Function Letter(strBOB As String, strOutcome As String) As String
Dim strBOBType As String
strBOBType = DLookup("AccountType", "tblAccounts", "Account= '" & strBOB &
"'")
If strBOBType = "HP" Then
Letter = "Yes"
ElseIf strOutcome = "ABD" Or Right(strOutcome, 3) = "ABD" Or
Right(strOutcome, 11) = "ABD w/ Auth" Then
Letter = "Yes"
Else
Letter = "No"
End If
End Function
The code works on its own but it will not allow me to limit it to "Yes" in a
query.
has shut off. Here is the code for the function:
Public Function Letter(strBOB As String, strOutcome As String) As String
Dim strBOBType As String
strBOBType = DLookup("AccountType", "tblAccounts", "Account= '" & strBOB &
"'")
If strBOBType = "HP" Then
Letter = "Yes"
ElseIf strOutcome = "ABD" Or Right(strOutcome, 3) = "ABD" Or
Right(strOutcome, 11) = "ABD w/ Auth" Then
Letter = "Yes"
Else
Letter = "No"
End If
End Function
The code works on its own but it will not allow me to limit it to "Yes" in a
query.