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

كلمة السر للنموذج فى inputBox


bassum

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

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

وضعت كود خاص للدخول للنموذج عبارة عن كلمة سر ولكن المشكلة تحصل عندما لا يدخل شيء المستخدم يعني يكون مربع الرسالة فارغة يعطي رسالة خطأ

الكود

Dim pass As Integer
  Dim massage As Integer
pass = InputBox("type your password", "Control box")
 If pass = 1212 Then
  DoCmd.OpenForm "contor"
  Else
  massage = MsgBox("Sorry your Pass is false")
  End If

السؤال كيف أعرف أن مربع النص فارغ لأن هناك تطبيقات أخرى عليها

وجزاه الله خيراً من ساعدني وله منى الدعاء والشكر الجزيل للقائمين على هذا الموقع

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

عدل الكود الذي كتبته ليصبح كما في الشكل التالي :

On Error GoTo Err
Dim pass As Integer
Dim massage As Integer
pass = InputBox("type your password", "Control box")
If pass = 1212 Then
DoCmd.OpenForm "contor"
Else
massage = MsgBox("Sorry your Pass is false")
End If
Err:
If Err.Number = 13 Then
MsgBox "أكتب هنا الرسالة التي تريد أن تظهر للمستخدم"
End If

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

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