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

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

قام بنشر

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

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

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

 

قام بنشر

وعليكم السلام

لقد عرفت متغير 

Dim str As String

ثم تستدعيه وكأنه مربع نص او مربع تحرير في النموذج  

Me.str

الافضل ان ترفع الملف استاذ جمال

  • Like 1

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