اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

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

قام بنشر
Private Sub Form_Current()
'setLabel
  
    Dim recClone As Object
    Dim intNewRecord As Integer
    
    If intNewRecord Then
        cmdfirstrec.Enabled = True
        cmdnextrec.Enabled = True
        cmdprevrec.Enabled = False
        cmdlastrec.Enabled = False
        cmd_add.Enabled = False
        Exit Sub
    Else
    
        cmd_add.Enabled = True
        cmdlastrec.Enabled = True
    End If
    Set recClone = Me.RecordsetClone
    If recClone.RecordCount = 0 Then
        cmdnextrec.Enabled = False
        cmdprevrec.Enabled = False
        cmdfirstrec.Enabled = False
        cmdlastrec.Enabled = False
    Else
       
     recClone.Bookmark = Me.Bookmark
        recClone.MovePrevious
       cmdfirstrec.Enabled = Not (recClone.BOF)
        cmdprevrec.Enabled = Not (recClone.BOF)
        recClone.MoveNext
        recClone.MoveNext
         cmdlastrec.Enabled = Not (recClone.EOF)
        cmdnextrec.Enabled = Not (recClone.EOF)
        recClone.MovePrevious
    End If

    Me![RecordCount] = "ÇáÓÌá " & (recClone.AbsolutePosition + 1) & " ãä " & _
                       DCount("[report_No]", "[receiptRD]")

    recClone.Close

Exit_Form_Current:
    Exit Sub

Err_Form_Current:
    If Err = 3021 Then
        
        cmdprevrec.Enabled = False
        cmdfirstrec.Enabled = False
        cmdnextrec.Enabled = False
        cmdlastrec.Enabled = False
        Resume Exit_Form_Current
    Else
        MsgBox Err.DESCRIPTION
        Resume Exit_Form_Current
    End If
Me.Refresh
End Sub

 

عندى ضغط على زار الامر اضافة سجل تظهر رسالة خطاء فى الكود    

Untitled.png

Screenshot 2023-06-12 130656.png

قام بنشر

ارفع مثال أفضل لكم ولنا 🙂 وخصوصا أن الكود طويل، لاحظت بعض الأخطاء وربما هي ليس أخطاء فارفع مثالك لنعرف السبب وإذا عرف السبب .....
 

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