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

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

قام بنشر

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

نضع الكود التالي في وحدة نمطية جديدة

Function fnAutoField() As String
 Dim strRndNo As String
    strRndNo = Format((9999 * Rnd) + 1, "10000")
    fnAutoField = strRndNo
End Function

ثم نضع في النموذج في حدث عند الادراج الكود التالي

 Me!TextBox1 = fnAutoField()

وفي زر الحفظ نضع الكود التالي

    If Me!TextBox3 = Me!TextBox1 Then
       MsgBox "error", vbInformation
       Me!TextBox1 = fnAutoField()
    Else
 
    End If

ان واجهت مشكلة في التطبيق لا قدر الله ارفق مثال ليتم التعديل عليه ان شاء الله

تحياتي

  • Thanks 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