عبد الله قدور قام بنشر يوليو 21 قام بنشر يوليو 21 السلام عليكم ورحمة الله وبركاته لقد قمت بانشاء شريطين في اكسس الاول يعرض شريط اكسس مع الشريط ، والثاني يعرض الشريط فقط بدون شريط اكسس الرئيسي المطلوب : كود يمكنني من تغيير الشريط المستخدم في نافذة الخيارات المرفقة في الصورة أو اذا كان الشفت مفعل يستخدم الشريط الاول اما اذا كان الشريط غير مفعل يستخدم الشريط الثاني
محب العقيدة قام بنشر يوليو 21 قام بنشر يوليو 21 اعتقد ولانه ليس لدي كمبيوتر الان يوجد حلول منها انشئ جدول مؤقت وضع نفس الاسم للريبون وضع خصائص الريبون التي تريد واستدعي الريبون الذي تريد لجدول USysRibbons او طريق ثانية As a general rule one should attempt to figure out how to use one main ribbon for a given user. For forms then one can well easy “set” the ribbon in the forms on-load event. However, if you designed the ribbon correct, then you should only need one - and just hide or show a few of the options you want for "managers" or say "sales reps". However for the application wide ribbon setting, quite sure this setting does not change until a re-start. However a really “simple” and cool way around this issue is to set the application wide ribbon, but MAKE SURE the ribbon does not in fact exist. You then in your application start-up code using the LoadcustomerUI. Remember the setting in a form or even the global ribbon is based on the “name” you give that ribbon WHEN you load it. For automatic loads from USYSRibbons, then the column “ribbon Name” is simply used. However as noted you CAN specify ANY ribbon name when you use LoadCustomUI - and this includes any XML you have for existing ribbons in the USYSRibbons table! So you might have a global ribbon setting of “MyMain”, but make sure NO such ribbon actually exists. Then in your start-up code you can grab any ribbon from the USYSRibbons table and execute a loadCustomUI on that ribbon. Eg: Dim strRib as string ‘Based on some user start-up setting, we want a managers ribbon, or a sales ribbon If Manager = True then strRib = dlookup("RibbonXml","USysRibbons","RibboName = 'Manager') else strRib = dlookup("RibbonXml","USysRibbons","RibboName = 'Sales') End if loadcustomui "MyMain",strRib Note CAREFULLY how in above when you execute LoadCusteormUI you STATE the name you want to use – in this case “MyMain”. So this “MyMain” also happens to be the global ribbon setting you set for Access on startup. But note how that ribbon does not exist until you execute LoadCustomUI. So the “name” you use when loading the ribbon can be the global setting in Access. Note that you can ONLY load into a given name ONE time for the duration of that application setting - so this will work to change the ribbon that displays - but you have to exit the application to switch that ribbon display again using this approach. Regards, Albert D. Kallal (Access MVP) Edmonton, Alberta Canada
عبد الله قدور قام بنشر يوليو 22 الكاتب قام بنشر يوليو 22 في 21/7/2024 at 15:58, محب العقيدة said: او طريق ثانية للاسف لم افهم ماقصدت
Moosak قام بنشر يوليو 23 قام بنشر يوليو 23 السلام عليكم أخي عبدالله 🙂 جرب هذا الكود حصلت عليه من الذكاء الاصطناعي : Private Sub ChangeRibbonName() Dim RibbonUI Set RibbonUI = Application.CommandBars("Ribbon").Controls("MyRibbonTab") RibbonUI.Caption = "New Ribbon Tab Name" End Sub المصدر : https://poe.com/s/J0iF2yZJzcWS5qH5umBo
عبد الله قدور قام بنشر يوليو 24 الكاتب قام بنشر يوليو 24 في 23/7/2024 at 13:27, Moosak said: MyRibbonTab السلام عليكم لم اعرف ماذا يقصد بهذا المتغير
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.