jamal2080 قام بنشر يونيو 11, 2023 قام بنشر يونيو 11, 2023 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 عندى ضغط على زار الامر اضافة سجل تظهر رسالة خطاء فى الكود
AbuuAhmed قام بنشر يونيو 11, 2023 قام بنشر يونيو 11, 2023 ارفع مثال أفضل لكم ولنا 🙂 وخصوصا أن الكود طويل، لاحظت بعض الأخطاء وربما هي ليس أخطاء فارفع مثالك لنعرف السبب وإذا عرف السبب .....
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.