اضف زر في التقرير ثم ضع هذا الكود
وظيفته ::: تكوين جدول باسم Temp ثم تصدير البيانات الموجوده في التقرير اليه .... الان تصتطيع فعل ما تشاء سواءا تكوين رسم بياني أو تصديرة للاكسل ... جرب ووافينا بالنتيجة
Dim strSQL2 As String
strSQL2 = "CREATE TABLE [Temp] ([Assessment] TEXT(5),[Reassessment] TEXT(5), [Multidisciplinary] TEXT(5),[Followup] TEXT(5),[LAMA] TEXT(5),[MLSD] TEXT(5),[Meeting] TEXT(5),[MOH] TEXT(5),[Rounds] TEXT(5),[Total] TEXT(5));"
DoCmd.RunSQL strSQL2
On Error Resume Next
Dim rs2 As Recordset, Dbs As DAO.Database
Set Dbs = CurrentDb
Set rs2 = Dbs.OpenRecordset("Temp")
rs2.AddNew
rs2.Fields(0) = [Reports]![Total of Assessment]![Count]
rs2.Fields(1) = [Reports]![Total of Reassessment]![Count]
rs2.Fields(2) = [Reports]![Total of Multidisciplinary]![Count]
rs2.Fields(3) = [Reports]![Total of Follow up]![Count]
rs2.Fields(4) = [Reports]![Total of LAMA]![Count]
rs2.Fields(5) = [Reports]![Total of MLSD]![Count]
rs2.Fields(6) = [Reports]![Total of meeting]![Count]
rs2.Fields(7) = [Reports]![Total of MOH]![Count]
rs2.Fields(8) = [Reports]![Total of Rounds]![Count]
rs2.Fields(9) = [Assessment] + [Reassessment] + [Multidisciplinary] + [Followup] + [LAMA] + [MLSD] + [Meeting] + [MOH] + [Rounds]
rs2.Update
Set rs = Nothing