تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] [تم الحل] مشكلة برنامج حساب نسب الموظفين
#23
أهلا بك أخي الكريم , هذا تعديل بسيط على كود الإجراء :

PHP كود :
Public Sub CountEM()

If 
RSGhiab.State adStateOpen Then RSGhiab.Close

RSGhiab
.Open "SELECT * FROM falowTB where ECase=0 And FDate=#" Format(Date"mm/dd/yyyy") & "#"DbadOpenStaticadLockPessimistic

If RSGhiab.RecordCount 0 Then
   
   
If RSGhiab.State adStateOpen Then RSGhiab.Close
   MsgBox 
"لقد تمت التهيئة مسبقاً"
   
Exit Sub
   
Else

   If 
RSCountEM.State adStateOpen Then RSCountEM.Close
   
   RSCountEM
.Open "SELECT EmID FROM EmpTB"DbadOpenStaticadLockPessimistic

   
If RSCountEM.RecordCount 0 Then
   
      RSCountEM
.MoveFirst
   
      
Do While Not RSCountEM.EOF
         RSGhiab
.AddNew
         RSGhiab
![FEmpID] = RSCountEM![EmID]
         
RSGhiab![FDate] = Format(Date"mm/dd/yyyy")
         
RSGhiab![Ftime] = Format(Time"HH:MM:SS AM/PM")
         
RSGhiab![Fday] = Format(Date"dddd")
         
RSGhiab![EReson] = ""
         
RSGhiab![ECase] = 0
         RSGhiab
![ECovr] = 0
         RSGhiab
![Enots] = ""
         
RSGhiab.Update
         DoEvents
         RSCountEM
.MoveNext
      Loop
   
      MsgBox 
"تمت التهيئة"

   
Else
   
      
MsgBox "لم تتم التهيئة, لم يتم العثور على موظفين مسجلين!"
   
   
End If

   If 
RSGhiab.State adStateOpen Then RSGhiab.Close
   
If RSCountEM.State adStateOpen Then RSCountEM.Close

End 
If

End Sub 
كود :
For Each Breathe in MyLife
Breathe.Say " سبحان الله والحمد لله ولا إله إلا الله والله أكبر أستغر الله العظيم وأتوب إليه"
Next
الرد }}}
تم الشكر بواسطة: elgokr , elgokr , Amir_Alzubidy , Amir_Alzubidy


الردود في هذا الموضوع
RE: مشكلة برنامج حساب نسب الموظفين - بواسطة Ahmed_Mansoor - 08-08-18, 07:39 AM


التنقل السريع :


يقوم بقرائة الموضوع: