Predmet:izvjestaj u pdf
***kod u verziji 2013 accessa fantassticno odradio posao kreira izvjestaj u pdf
svi moji pokusaji da ga iskoristim u 2003 nisu uspijeli
naime kod
pokazuje gresku na liniji( DoCmd.OutputTo acOutputReport, "rInPBanHang", acFormatPDF, sPath & "\" & sFile)
u dijelu, tacniji na izrazu acOutputReport
svaka ideja dobro dosla ...
Private Sub cborpt_AfterUpdate()
Me.cmdExport.SetFocus
End Sub
Private Sub cmdExport_Click()
Dim i As Integer
Dim sFile As String
Dim sPath As String
With Me.cmdExport
.Left = .Left - 50
.Width = .Width + 100
.Top = .Top - 50
.Height = .Height + 100
End With
Do Until i >= 50
DoEvents
i = i + 1
Loop
With Me.cmdExport
.Left = .Left + 50
.Width = .Width - 100
.Top = .Top + 50
.Height = .Height - 100
End With
DoEvents
If Me.cborpt.ListIndex > -1 Then
sPath = CurrentProject.Path & "\Proba"
ForceMKDir sPath
sFile = Format$(cborpt, "00000") & "-HD-QCNB-" & Format$(Now, "dd_MM_yyyy_hh_nn") & ".PDF"
On Error Resume Next
Kill sPath & "\" & sFile
On Error GoTo 0
DoCmd.OutputTo acOutputReport, "rptXXXX", acFormatPDF, sPath & "\" & sFile
MsgBox "Successfully created " & sFile & " to " & vbCrLf & _
sPath & "."
Application.FollowHyperlink sPath
End If
End Sub