I now have a text box that disappears on normal view of the report. However the code below converts the report to a PDF. When I review the PDF the text box is there. Any ideas?
Public Sub ExportPDFINVOICE(strRoot As String, strPropertyAddress As String, strprojectnumber As String, strInvoiceNumber As Long, strBillingCompany As String, rpt As String)
On Error GoTo Err_Handler
Dim strPath As String
'Root directory of your file
strPath = strRoot & "\" & strprojectnumber & " " & strPropertyAddress & "\"
Dim strFile As String
'Full address of your file
strFile = strPath & "Invoice" & " " & strInvoiceNumber & " " & strBillingCompany & " " & strPropertyAddress & " " & "Project Number" & " " & strprojectnumber & ".pdf"
'Does the directory exist? If not, create it
If Exist(strPath, vbDirectory) = 0 Then MkDir (strPath)
'Does the file exist?
If Exist(strFile) Then
Dim intResponse As Integer
intResponse = MsgBox("That file already exists! Would you like to replace it?", vbYesNo, "Error")
If intResponse = vbYes Then
Kill (strFile)
Else
Public Sub ExportPDFINVOICE(strRoot As String, strPropertyAddress As String, strprojectnumber As String, strInvoiceNumber As Long, strBillingCompany As String, rpt As String)
On Error GoTo Err_Handler
Dim strPath As String
'Root directory of your file
strPath = strRoot & "\" & strprojectnumber & " " & strPropertyAddress & "\"
Dim strFile As String
'Full address of your file
strFile = strPath & "Invoice" & " " & strInvoiceNumber & " " & strBillingCompany & " " & strPropertyAddress & " " & "Project Number" & " " & strprojectnumber & ".pdf"
'Does the directory exist? If not, create it
If Exist(strPath, vbDirectory) = 0 Then MkDir (strPath)
'Does the file exist?
If Exist(strFile) Then
Dim intResponse As Integer
intResponse = MsgBox("That file already exists! Would you like to replace it?", vbYesNo, "Error")
If intResponse = vbYes Then
Kill (strFile)
Else