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

يوجد خطأ في كود البحث _ عنوان معدل


jamal2080

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

السلام عليكم ورحمة الله وبركاته

عندى كود نمودج بحث يوجد خطا 

1 - هل هناك مكتبة غير موجوده 

ارجوا منكم مساعدها 

Option Compare Database
Dim Anim As clsFormAnimate
Private Sub cmd_exit_Click()
On Error GoTo Err_EXIT_Click

    DoCmd.Close

Exit_EXIT_Click:
    Exit Sub

Err_EXIT_Click:
   Handle_Errors_ADO "", Err.Number, Err.DESCRIPTION
    
    Resume Exit_EXIT_Click
End Sub


Private Sub cmd_search_Click()
Dim str As String
Dim str_2 As String
Dim mth As Integer
Dim X
 
  If GENERAL.PRVCTRL.ControlType <> acComboBox Then
   
    
             If Me.FLDSRH <> "" Then
     
                                Select Case Me.srhtyp.Value
        
                                  Case "1"
                                            str = Me.FLDSRH & " = " & """" & Me.str & """"
                                            str_2 = Me.FLDSRH & " = " & Me.str
               
                                  Case "2"
                                            str = Me.FLDSRH & " LIKE " & """" & Me.str & "*"""
                                  Case "3"
                                            str = Me.FLDSRH & " LIKE " & """*" & Me.str & "*"""
                                  Case "4"
                                            str = Me.FLDSRH & " LIKE " & """*" & Me.str & """"
                                End Select
    
                 Else
                           str = "1=1"
             End If
    
    
  Else
    
                 X = GENERAL.PRVCTRL.RowSource

                 X = GENERAL.PRVCTRL.Column(1)

                If Me.FLDSRH <> "" Then
     
                           Select Case Me.srhtyp.Value
        
                                  Case "1"
                                         str = Me.FLDSRH & " = " & """" & Me.str & """"
                                         str_2 = Me.FLDSRH & " = " & Me.str
                                  Case "2"
                                         str = Me.FLDSRH & " LIKE " & """" & Me.str & "*"""
                                  Case "3"
                                         str = Me.FLDSRH & " LIKE " & """*" & Me.str & "*"""
                                  Case "4"
                                         str = Me.FLDSRH & " LIKE " & """*" & Me.str & """"
                           End Select
    
                  Else
                         str = "1=1"
                 End If


   End If

If IsNull(Me.srhtyp.Value) Then
  mth = 0
Else
  mth = Me.srhtyp.Value
End If
DO_FIND str, str_2, mth
 DoCmd.Close acForm, "frm_find", acSaveYes
End Sub
Private Sub Form_Load()
Dim A As Integer
 
  
  

   
    FLDSRH = GENERAL.PRVCTRL.Name
End Sub
Private Sub Form_Open(Cancel As Integer)
Set Anim = New clsFormAnimate
  '  Set Anim.AnimationForm = Me
  '  Anim.FormHeight = 2500
  '  Anim.FormWidth = 4900
  '  Anim.FormTop = 1000
  '  Anim.FormLeft = 100
   ' Comment out line below if you
   ' want Animation when closing the Form.
  '  Anim.NoCloseAnimation = True
   ' Uncomment if you do NOT want
   ' Animation when the Form opens
   'Anim.NoOpenAnimation = True
 
End Sub

 

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

من فضلك سجل دخول لتتمكن من التعليق

ستتمكن من اضافه تعليقات بعد التسجيل



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

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

Important Information