اذهب الي المحتوي
أوفيسنا

تعديل كود


jamal2080

الردود الموصى بها

 

 

يوجد خطاء فى الكود 

Sub user_licence()
   
   Dim SER1 As Integer  'كود مستخدم
   Dim FRM1 As Integer  'اضافة
   Dim FRM2 As Integer  'تعديل
   Dim FRM3 As Integer  'عرض
   Dim FRM4 As Integer  'حذف
   Dim FRM5 As Integer  'طباعة
 
     Dim strSQL As String
     Dim rst As New ADODB.Recordset
   
     strSQL = "select * from MsysFRMsu"
  
   rst.Open strSQL, CurrentProject.Connection, _
     adOpenKeyset, adLockOptimistic

    rst.MoveFirst
     SER1 = rst!SERu
    FRM1 = rst!FRM1u
    FRM2 = rst!FRM2u
    FRM3 = rst!FRM3u
    FRM4 = rst!FRM4u
    FRM5 = rst!FRM5u

   '  rst.Close
   'حفظ و تراجع
      '-----------
      If FRM1 = 1 Or FRM2 = 1 Or FRM4 = 1 Then
            Me.cmdsaverec.Enabled = True
            Me.cmd_undo.Enabled = True
            Me.cmd_Undo_sub.Enabled = True
        
         Else
            Me.cmdsaverec.Enabled = False
            Me.cmd_undo.Enabled = False
            Me.cmd_Undo_sub.Enabled = False
      End If
      
     If FRM1 = 1 Or FRM2 = 1 Or FRM3 = 1 Or FRM4 = 1 Or FRM5 = 1 Then
                Me.cmdexitrec.Enabled = True
     End If
          
  'عرض
  If FRM3 = 1 Then
  
         Me.cmdfindrec.Enabled = True
         Me.cmd_fresh.Enabled = True
         Me.cmdfirstrec.Enabled = True
         Me.cmdlastrec.Enabled = True
         Me.cmdnextrec.Enabled = True
         Me.cmdprevrec.Enabled = True
 
     Else
         Me.cmdfindrec.Enabled = False
         Me.cmd_fresh.Enabled = False
         Me.cmdfirstrec.Enabled = False
         Me.cmdlastrec.Enabled = False
         Me.cmdnextrec.Enabled = False
         Me.cmdprevrec.Enabled = False
         
  End If

  'اضافة
  If FRM1 = 1 Then
         Me.cmd_add.Enabled = True
         Me.cmd_add_sub_emp_code.Enabled = True
     
     Else
         Me.cmd_add.Enabled = False
         Me.cmd_add_sub_emp_code.Enabled = False
        
  End If
  
  'تعديل
  If FRM2 = 1 Then
         Me.cmd_mod.Enabled = True
     Else
         Me.cmd_mod.Enabled = True
  End If
          
  
  'حذف
  
  If FRM4 = 1 Then
  
         Me.cmddelrec.Enabled = True
         Me.cmd_delsubrec.Enabled = True

     Else
         Me.cmddelrec.Enabled = False
         Me.cmd_delsubrec.Enabled = False
 End If
    
   'طباعة
  
  If FRM5 = 1 Then
  
         Me.cmdprv.Enabled = True
     
     Else
         Me.cmdprv.Enabled = False
  End If
  

End Sub

 

يعطى خطاء فى هذا سطر                   Dim rst As New ADODB.Recordset

 

رابط هذا التعليق
شارك

شكرا اخى ...

عندما نخيار المكتبة  Microsoft ActiveX Data Objects 3.6

تظهر رسالة تحذير 

Name conflicts with existing module, project, or object library

Untitled.png

تم تعديل بواسطه jamal2080
رابط هذا التعليق
شارك

 

الاخ :- مهندس قاسم

شكر على اهتمامك لك منى كل احترام وتقدير 

ابحث فى المواقع وجدت كود على رسالة تنبية   

Option Compare Database
Option Explicit
Dim Anim As clsFormAnimate
Dim Msg, Style, Title, Help, Ctxt, Response, MyString, mResult
------------------------------------------------------------------------
If GENERAL.PRVCTRL.name = "frm_RD" Then
       '-------------------------------------------------
       Msg = "غير مسموح بالبحث  .. البحث فقط فى رقم الطلبية "
       Style = vbOKOnly
       Title = "                           برنامج الاستلام المواد المحلية والخارجية         "
       Dim s As Integer
       s = 10 ' عدد الثواني
       mResult = MsgBoxPause(hwnd, Msg, Title, Style, s)
       '-------------------------------------------------
    Resume Exit_cmdfindrec_Click
   End If

هل ممكن شرح هذا الكود

تم تعديل بواسطه jamal2080
رابط هذا التعليق
شارك

 

استبدل هذا السطر

4 ساعات مضت, jamal2080 said:
Dim rst As New ADODB.Recordset

 

بهذا بما انها قاعدة محلية

Dim rst As New DAO.Recordset

 

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information