اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

make one of the buttons inactive


islammmi

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

My dear brother..

i have a form like this one in the picture..

i want when i choose for example (Number 1) from the field Select.... it will make the Number one button still active so when i click over this button it will open a new form named Number 1 form... in the meantime.... the button named Number 2 will be inactive... i mean ... not functioning...

and if i choosed number 2 from the field select... the opposite will occur.. so number 1 button will be inactive... and number 2 button will be still active so i can go only to form named (number 2 form

it is very important step for my database.. hope you can hlep me in this point.. if you can give me the reply with pic.. that could be great..

look at my pic.. thx alot

acc.jpg

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

My dear brother..

i have a form like this one in the picture..

i want when i choose for example (Number 1) from the field Select.... it will make the Number one button still active so when i click over this button it will open a new form named Number 1 form... in the meantime.... the button named Number 2 will be inactive... i mean ... not functioning...

and if i choosed number 2 from the field select... the opposite will occur.. so number 1 button will be inactive... and number 2 button will be still active so i can go only to form named (number 2 form

it is very important step for my database.. hope you can hlep me in this point.. if you can give me the reply with pic.. that could be great..

look at my pic.. thx alot

acc.jpg

http://islammmi2.topcities.com/acc.jpg

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

Assume that The name of Combo Box is SelectCombo
and you Filled its list by 2 Text "NEmber 1" and "Number 2" and
you have tow Battons the First has Name= Command1 and Caption =Number 1
the Second has Name= Command2 and Caption =Number 2
Add this Code in Even AfterUpdate For SelectCombo

Private Sub SelectCombo_AfterUpdate()
 Select Case SelectCombo
   Case "Number 1"
    [Command1].Enabled = True
    [Command2].Enabled = False
  Case "Number 2"
    [Command1].Enabled = False
    [Command2].Enabled = True
 End Select
End Sub

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

Thx alot my dear brother for your great concern.. and your quick respone.. i really appreciate that too much..

but i wanna tell you that i am using Office2000 Italian version because i am staying in italy for the moment... i wonder if you can tell me give me this example again but using the office 2000 even the english version.. i guess that could be the problem ...

thx alot .. and waiting for your kind reply..

salam allah alukom

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

wallahe i cannot find words to thank you for your response to my problem.. you are very kind indeed.. and may allah give you alot of thawab for what you are doing for us.. i will try the new file and i am shy to ask you again if i face another problem.. but i realized how much kind you are .. so sorry if i bothered you with my problem..

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

My dear brother.. Thx alot for your kind help.. i really cannot find the words to thank you .. cuz that was a mandatory and crucial step in my database..

may allah give you alot of thawab for your wonderful effort ....

thx god.. it is working with me.. and no more problem.. i have just one more question...

i am designing this database using office 2000 italian version.. when i return back to egypt.. i will use windowXP english version.. do you think it could be a problem.. or it will work in a normal manner..

thx alot again

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

اخي العزيز بارك الله فيك علي الحل الفعال لمشكلتي الحمد لله الكود شغال 100% كما في الصورة الاولي

http://mohahmbas2.topcities.com/databasepic/button1.jpg

PLEASE TAKE IT COPY AND PASTE CUZ IT IS NOT POSSIBLE TO SHOW IT HERE..

لكن فيه حاجة صغيرة مهمة

وهي اني لما ادخل علي النموذج مرة اخري اجد كل الزراير Enabled مرة اخري لان فكرة تشغيل الكود بيعتمد فقط علي بعد تعديل SelectCombo في المثال الذي تفضلت بارساله لي او Procedure type في database الخاصة بي كما في الصورة الثانية

http://mohahmbas2.topcities.com/databasepic/button2.jpg

تجد انه عند فتح النموذج مرة اخري كل الزاير متاحة فانا اريد عندما اختار عنصر من القائمة يبقي زر واحد فقط نشط عند فتح النموذج مرة اخري...

thx for your patience with me.. and it is difficult for me to write in arabic cuz i am in italy now.. and it is quite hard to write in arabic.. so excuse me my dear brother..

waiting for your crucial solution as you are always doing.. slaamat

تم تعديل بواسطه islammmi
رابط هذا التعليق
شارك


Solution1
In Design Mode for the all Four Battons Make the Property Enabled =No
Solution 2
1-Add else statment in Select Case To Desable the all Battons
2-Call The SelectCombo_AfterUpdate in the Event OnOPen for form

Private Sub Form_Open(Cancel As Integer)
 Call SelectCombo_AfterUpdate
End Sub

Private Sub SelectCombo_AfterUpdate()
 Select Case SelectCombo
   Case "Procedure 1"
    [Command1].Enabled = True
    [Command2].Enabled = False
    [Command3].Enabled = False
    [Command4].Enabled = False
  Case "Procedure 2"
    [Command1].Enabled = False
    [Command2].Enabled = True
    [Command3].Enabled = False
    [Command4].Enabled = False
  Case "Procedure 3"
    [Command1].Enabled = False
    [Command2].Enabled = False
    [Command3].Enabled = True
    [Command4].Enabled = False
  Case "Procedure 4"
    [Command1].Enabled = False
    [Command2].Enabled = False
    [Command3].Enabled = False
    [Command4].Enabled = True
  Case Else
    [Command1].Enabled = False
    [Command2].Enabled = False
    [Command3].Enabled = False
    [Command4].Enabled = False
 End Select
End Sub

Battons2.zip

تم تعديل بواسطه السيد عبد العال
رابط هذا التعليق
شارك

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