السادة الافاضل السلام عليكم جميعا ورحمة الله وبركاته
باختصار حتى لا اطيل
انا عامل برنامج رواتب وكنت عامل زر تصدير تقريران مرة واحدة ولكن تقرير يصدر الى pdf والاخر الى text وكان يعمل والامور كلها تمام ولكن فجأة تعطل الكود ولا ادرى ما السبب وانا سالصق الكود هنا ورجاء افيدونى ما الخطأ
الكود :
Private Sub Command_Click()
Dim FileName As String
Dim FilePath As String
Dim FilePath1 As String
FileName = Me.[bankcode] & Right(Year(Date), 2) & "0" & Month(Date) & Day(Date) & "100000"
FilePath = Me.[FPath] & FileName & ".txt"
FilePath1 = Me.[FPath] & FileName & ".PDF"
DoCmd.OutputTo acOutputReport, "word", acFormatPDF, FilePath1
DoCmd.OutputTo acOutputReport, "empdataa", acFormatTXT, FilePath
MsgBox "Done" & " " & Me.FPath, vbInformation, "alert massege"
End Sub
ومشكورين