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

(تمت الاجابة) وضع password على الفورم


wewe75

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

هذي محاولة على السريع ... ضع الكود في الحدث OnOpen

Dim inputLine As String
Const password As String = "123"
inputLine = InputBox("أدخل كلمة السر", "password")
If inputLine <> password Then
MsgBox ("خطأ في كلمة السر")
Cancel = True
End If

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

  • 2 weeks later...

يمكنك استخدام الأمر InputBox لإدخال كلمة السر .. أو تقوم بتصميم فورم به مربع نص للإدخال حسب رغبتك

Password = InputBox("Enter Your Password Please", "Password Dialog Title", "Default Value", "Left Alignment", "Top Alignment", _ 
"The Full Path Of Help File If needed (if the user press Help", "a Number Included with the Help file ")
و هذا المثال موجود بالأكسيس
Dim Message, Title, Default, MyValue
Message = "Enter a value between 1 and 3"    ' Set prompt.
Title = "InputBox Demo"    ' Set title.
Default = "1"    ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)

' Use Helpfile and context. The Help button is added automatically.
MyValue = InputBox(Message, Title, , , , "DEMO.HLP", 10)

' Display dialog box at position 100, 100.
MyValue = InputBox(Message, Title, Default, 100, 100)
بعد أن يتم إدخال كلمة السر في متغير يمكنك حفظها في خاصية Tag في الفورم أو مربع النص و لكن لا يمكنك تعديل هذه القيمة إلا عند فتح الفورم بمرحلة التصميم ... يعني مثلا
Docmd.OpenForm "Form1" , acDesign
Forms("Form1").Tag = password
docmd.close acForm , "Form1"

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

أرجو أن يكون هذا طلبك

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

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