OK, this one has me about to throw the computer out the window.
I am sending a report from a form using a command button. The message body will include a link to the document associated with the report - I am pulling that from a hyperlink field called FilePath. Sometimes that path will be empty, and I can't figure out how to handle it.
Here is the onclick for the command button.
Private Sub Command42_Click()
On Error GoTo Command42_Err
Dim strFilePath As String
strFilePath = Mid(Me.FilePath, 4, Len(Me.FilePath) - 4)
DoCmd.SendObject acSendReport, "rptMemoSend", "SnapshotFormat(*.snp)", , , , "Executive Secretariat Tasking", "Please see the attached document for tasking information related to the following link. <\\pasa27dc01\office shares" & strFilePath & ">", True
I've tried every freaking combination of If - Else, and If - ElseIf statement I can think of and always get either a data type mismatch, an object required, or, most frequently, an Invalid Use of Null error.
Please - send some advice or a small explosive device this way.