It is often helpful to be able to find the path that a DataPath export was saved to.  For example, a PDF export could be used to attach to an email.  To find the exact path of the export:

Private Function GetFilename(ByVal DataPath As String) As String

     Dim filename As String

     For Each er As ExportResult In _form.Validator.ExportResults

         If er.DataPathName = DataPath Then

             filename = er.ExpandedFilePath         

         End If


    RecordExportResult("Filename for " & DataPath & " : " & filename, True, "", "", "")

    Return filename

 End Function