Consulting

Results 1 to 12 of 12

Thread: Returning the Caption Property for active controls in an email body

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Returning the Caption Property for active controls in an email body

    Hello all,

    Looking at the picture I attached, I am trying to have all data entered in the form returned in the body of an email.

    How can I get the caption of any checkboxes selected returned into the body of my email?

    I used the code below but, it returned the caption on the frame instead of the caption of the active control in the frame.

    I hope what I'm trying to ask that makes sense...

    If Me.Frame1.ActiveControl.Caption = "Yes" And frameNewExis.Visible = True And frameNewExis.ActiveControl.Caption = "Existing" Then 
        strBody = "<BODY style=" & "font face=calibri" & "font size=11" & ">" & "<b><i>Please refer to the details of the request below:</i></b>" & _
                    "<br><br>" & _
                    "********************************************" & _
                    "<br><br>" & _
                    "<b>" & Me.lblDate & ": " & "</b>" & Me.txtDate.Value & _
                    "<br><br>" & _
                    "<b>" & Me.lblBusinessNeed & ": " & "</b>" & Me.txtBusinessNeed & _
                    "<br><br>" & _
                    "<b>" & Me.lblProduct & ": " & "</b>" & Me.txtProduct & _
                    "<br><br>" & _
                    "<b>" & Me.lblCopyFrom & ": " & "</b>" & Me.txtCopyFrom & _
                    "<br><br>" & _
                    "<b>" & Me.lblExtend & ": " & "</b>" & Me.txtExtend & _
                    "<br><br>" & _
                    "<b>" & Me.lblDeal & ": " & "</b>" & Me.frameNewExis.ActiveControl.Caption & _
                    "<br><br>" & _
                    "<b>" & Me.frameDealType.Caption & ": " & Me.frameDealType.ActiveControl.Caption & _
                    "<br><br>" & _
                    "<b>" & Me.Label1 & ": " & "</b>" & Me.TextBox1 & _
                    "<br><br>" & _
                     "********************************************" & "</BODY>"
    
    
        End If

    The part that says: "...Me.frameDealType.ActiveControl.Caption..." didn't turn out as I expected.

    Also, if anyone knows a MUCH simpler way to convert inputted values in the form to the body of an email...please share!

    Thanks in advance.
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •