بحث مخصص من جوجل فى أوفيسنا
Custom Search
|
البحث في الموقع
Showing results for tags 'dao'.
تم العثور علي 2 نتائج
-
السلام عليكم اخواني واساتذتي الافاضل عند تنفيذ هذا الكود للتصدير لجدول قاعدة خارجية تظهر رسالة بالخطأ رقم 3061 ( معلمات قليلة جدا المتوقع هو 2 ) Sub exporttablefromto() ' تصدير بيانات الى جدول خارجي مع رقم تسلسلي Dim dbOther As DAO.Database Dim rs1 As DAO.Recordset Dim dbCurrent As DAO.Database Dim rs2 As DAO.Recordset Dim intI As Integer Dim strSQL As String Dim intMax As Integer On Error GoTo ErrorHandler Set dbOther = OpenDatabase([Forms]![started]![All_save_delet]![txt2Path]) Set rs1 = dbOther.OpenRecordset("N_estelamerasael", dbOpenDynaset) Set dbCurrent = CurrentDb strSQL = "SELECT nik_N_estelamerasael.noAccIDcash, nik_N_estelamerasael.idnoalohad , nik_N_estelamerasael.id_offic " & vbCrLf & _ ", nik_N_estelamerasael.cod_num_taslsol, nik_N_estelamerasael.nopolesa, nik_N_estelamerasael.namostalem, nik_N_estelamerasael.phomostalem " & vbCrLf & _ ", nik_N_estelamerasael.nammorsel, nik_N_estelamerasael.phomorsel " & vbCrLf & _ ",nik_N_estelamerasael.date_input " & vbCrLf & _ ", nik_N_estelamerasael.total,import_N_MoneyMoves1.codhesam1 " & vbCrLf & _ ", nik_N_estelamerasael.namtadelrasael " & vbCrLf & _ ", nik_N_estelamerasael.from_where " & vbCrLf & _ ", nik_N_estelamerasael.albyan " & vbCrLf & _ ", nik_N_estelamerasael.monydriver1 " & vbCrLf & _ ", nik_N_estelamerasael.to_fragat, nik_N_estelamerasael.mony_kadasi_ersal " & vbCrLf & _ ", nik_N_estelamerasael.chang_color, import_N_MoneyMoves1.albyan " & vbCrLf & _ ", nik_N_estelamerasael.nopolesa, nik_N_estelamerasael.omolapolesa, nik_N_estelamerasael.nopolesaohad " & vbCrLf & _ ", nik_N_estelamerasael.dd1 " & vbCrLf & _ "FROM nik_N_estelamerasael " & vbCrLf & _ "WHERE (((nik_N_estelamerasael.nopolesa)>0) AND ((nik_N_estelamerasael.addrasael)>0) AND ((nik_N_estelamerasael.no_tadel_delet)=Yes) AND ((nik_N_estelamerasael.name_open_shasha)=[Forms]![ersal_estlam]![name_open_shasha]) AND ((nik_N_estelamerasael.id_date_estelame)=[Forms]![ersal_estlam]![id_date_time])) " & vbCrLf & _ "ORDER BY nik_N_estelamerasael.nopolesa " & vbCrLf & _ "WITH OWNERACCESS OPTION;" Set rs2 = CurrentDb.OpenRecordset(strSQL) rs2.MoveLast: rs2.MoveFirst RC = rs2.RecordCount For i = 1 To RC rs1.AddNew rs1!coderesala1 = (CurrentDb.OpenRecordset("select Max([coderesala1]) from N_estelamerasael in '" & [Forms]![الاستقبال]![All_save_delet]![txt2Path] & " ' ")(0)) + 1 rs1!noAccIDcash = rs2!noAccIDcash rs1!idnoalohad = rs2!idnoalohad rs1!id_offic = rs2!id_offic rs1!AccID = Me.AccID rs1!ArAccDes = Me.ArAccDes rs1!AccID1 = Me.AccID rs1!ArAccDes1 = Me.ArAccDes rs1!no_record = 0 rs1!no_resala = rs2![nopolesa] rs1!no_taslsol_estelame = rs2!cod_num_taslsol rs1!namostalem = rs2!namostalem rs1!phomostalem = rs2!phomostalem rs1!nammorsel = rs2!nammorsel rs1!phomorsel = rs2!phomorsel rs1!typeresala = "0" rs1!noterasael = Me.typefatora rs1!usernam = Me.sss rs1!date_input = rs2!date_input rs1!total = rs2!total rs1!codhesab = Me.codhesam1 rs1!namtadelrasael = rs2!namtadelrasael rs1!no_estelam = Me.ID rs1!addrasael = 1 rs1!years = Me.years rs1!tarheel = -1 rs1!fatoratasleme = Me.typefatora rs1!no_safha = Me.no_safha rs1!from_where = rs2!from_where rs1!no_sanad = 0 rs1!albyan = rs2!albyan rs1!monydriver = -1 rs1!codhesab1 = Me.codhesam1 rs1!to_fragat = rs2!to_fragat rs1!mony_kadasi_ersal = rs2!mony_kadasi_ersal rs1!chang_color = Me.name_shasha rs1!rabtkaeda_close = rs2!albyan rs1!typ_estelam_ersal = -1 rs1!nopolesa = rs2![nopolesa] rs1!coderes_tahdeth = 0 rs1!omolapolesa = rs2!omolapolesa rs1!nopolesaohad = rs2!nopolesaohad rs1!dd1 = rs2!dd1 rs1!dd2 = 0 rs1!dd3 = 0 rs1.Update rs2.MoveNext Next i MsgBox "Done", vbInformation, "تبيه" rs1.Close Set dbOther = Nothing rs2.Close Set dbCurrent = Nothing ErrorHandler: MsgBox "Error #: " & Err.Number & vbCrLf & vbCrLf & Err.Description End Sub فما هو الحل اخواني بارك الله فيكم وفي علمكم
-
السلام عليكم و رحمة الله هذا كود يقوم 1- حساب عدد حصص كل معلم وتسجيلها فى مربع نص اسمه sthu88 2 - حساب مجموع كل الحصص و تدوينها فى مربع نص اسمه total وذلك بالتنقل عبر حقول الاستعلام Q_all و حساب الحصص و ذلك باستخدام رقم الحقل فى dao وقد قمت بعمل دوارتين لهذا الغرض و قد اضطررت لتكرار جزء من الدوارة الأولى و استخدامه فى الدوارة الثانية Private Sub تفصيل_Format(Cancel As Integer, FormatCount As Integer) Dim db As Database Dim rs As DAO.Recordset Dim i As Integer Dim ii As Integer Dim tt As Integer Set db = CurrentDb Set rs = db.OpenRecordset(Me.RecordSource) rs.MoveFirst Do Until rs.EOF For i = 3 To 47 If rs(i) <> "" Then ii = ii + 1 End If Next i tt = tt + ii rs.MoveNext ii = 0 Loop rs.MoveFirst rs.FindFirst ("[tt_tname]=" & [tt_tname]) For i = 3 To 47 If rs(i) <> "" Then ii = ii + 1 End If Next i Me.sthu88 = ii Me.total = tt rs.Close Set rs = Nothing db.Close Set db = Nothing End Sub الجزء المكرر هو هذا الذى يحسب عدد حصص كل مدرس For i = 3 To 47 If rs(i) <> "" Then ii = ii + 1 End If Next i Me.sthu88 = ii هل يمكن ضم الدوارتين معا كما كنت أحاول سابقا لكنى لم أنجح شكرا لكم مقدما الملف مرفق و التقرير rpt_alls newTab113.rar