The code in Post #6 is missing a line: "End If".
Maybe try this:
Code:
Private Sub cmdSendEmail_Click()
Dim Subject As String
Dim Body As String
Dim Email As String
' If IsNull(Me.cboApprover) Then
If Len(Trim(Me.cboApprover)) = 0 Then '<- Me.cboApprover could have an empty string and not a NULL
MsgBox "This is fun"
Exit Sub
End If
Subject = "Test Request Approval"
Body = ""
Body = Body & "GTSR ID: " & GTSR_TR_ID.Value & vbNewLine & vbNewLine
Body = Body & "TR ID: " & TR_ID.Value & vbNewLine & vbNewLine
Body = Body & "Revision Test Request is on (starts at 0): " & Revisions.Value & vbNewLine & vbNewLine
Body = Body & "Test Title: " & Test_Title.Value & vbNewLine & vbNewLine
Body = Body & "Requestor's Name: " & cbofirst_name.Value & " " & cbolast_name.Value & vbNewLine & vbNewLine
Body = Body & "Requestor Clock #: " & cboclock.Value & vbNewLine & vbNewLine
Body = Body & "A/C Model: " & Combo58.Value & vbNewLine & vbNewLine
Body = Body & "This email was auto-generated!"
Email = GetApproverEmailFromName(Me.cboApprover)
DoCmd.SendObject acSendNoObject, "", "", Email, , , Subject, Body, True
DoCmd.Close acForm, "TR_Form"
DoCmd.Close acForm, "GTSR_ID_For_TR_Form", acSaveYes
End Sub
Just curious:
Why are you using a function to get the value from "Me.cboApprover", instead of just getting the value from the combo box?
Code:
Email = GetApproverEmailFromName(Me.cboApprover)
What is the code for the function?