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

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

قام بنشر

تفضل التعديل

اخفاء العناصر

Dim ctl As Control
For Each ctl In Me.Controls
    If TypeName(ctl) = "TextBox" Then
        Form(ctl.Name).Visible = False
    End If
Next ctl

عدم تمكين الكتابة داخل مربع النص لجميع العناصر

Dim ctl As Control
For Each ctl In Me.Controls
    If TypeName(ctl) = "TextBox" Then
        Form(ctl.Name).Enabled = False
    End If
Next ctl

 

Database41.accdbFetching info...

  • Like 1
قام بنشر

ويمكن اختصار الإجراءين كالتالي:
 

Dim ctl As Control
    
For Each ctl In Me.Controls
    ctl.Visible = ctl.ControlType <> acTextBox
Next ctl
    
Set ctl = Nothing



    

Dim ctl As Control
    
For Each ctl In Me.Controls
    ctl.Enabled = ctl.ControlType <> acTextBox
Next ctl
    
Set ctl = Nothing

 

  • Like 1
قام بنشر (معدل)

كنت نسيت اوضح نقطة بس
فى بعض الحقول مطلوب اخفاءها فقط وليس الكل

بمعني أن النموذج مكون من 7 حقول

كنت عايز اخفى 3حقول فقط بالضغط على زر

ويتم اظهرهم ايضاً بزر اخر 

بسبب وجود حقول اخري بالفعل مخفيه لا اريد ازهارها

 

تم تعديل بواسطه naguib_3778

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