PDA

View Full Version : برای اجرای کوئری توسط دکمه باتن باید چکار کرد؟



mohamad2526
جمعه 10 اسفند 1386, 00:54 صبح
یک کوئری مثل delete یا insert با استفاده از دستورات SQL نوشتم اگر بخواهیم بازدن دکمه باتن کوئری اجرا شود باید چه کار کنم حالا یا از طریق ماکرو یا وی بی؟

مهدی قربانی
جمعه 10 اسفند 1386, 03:23 صبح
سلام
دوست عزیز میتونید با استفاده از ویزارد کامند باتون و انتخاب گزینه Miscellaneus و بعد انتخاب گزینه Run Query از کادر مقابل اقدام به ساخت کامند باتون برای اجرای کوئری بسازید .

mohamad2526
جمعه 10 اسفند 1386, 12:02 عصر
دوست عزیز mahdi-gh :

کاری که گفتی انجام دادم ولی هنگامی که finish می کنم پیغام خطای زیر برام می یاد:


microsoft office failed to create the visual basic module

مهدی قربانی
جمعه 10 اسفند 1386, 20:03 عصر
سلام
1. شما با چه ورژنی از اکسس کار می کنید ؟
2 . آیا دسترسی به محیط کدنویسی VBA برنامه تون دارید ؟
3 . فایل مورد نظر MDE‌ نیست ؟

mohamad2526
شنبه 11 اسفند 1386, 01:13 صبح
با اکسس 2003 کار می کنم وبه محیط وی بی هم دسترسی دارم ! خوب حالا باید چه کار کنم

mohamad2526
شنبه 11 اسفند 1386, 01:14 صبح
منظور از فایل mde که ذکر کردید چیه ؟

مهدی قربانی
شنبه 11 اسفند 1386, 08:11 صبح
سلام
پیغامی که شما بهش اشاره کردید معمولاً در چند مورد می تونه رخ بده اول : اشکال در برنامه Access‌ مورد استفاده دوم : قفل کردن محیط کد نویسی VBA ( پسورد ) البته اگر MDE‌ باشه که اصلاً به محیط Design‌ و VBA‌دسترسی ندارید .
در مورد MDE : فایلهای Access‌ در حالت عادی با پسوند MDB‌ ساخته و ذخیره میشن حالا اگر بخوایم فایل رو از نظر طراحی و تغییر ساختار غیر قابل تغییر کنیم باید بواسطه تبدیل MDB به MDE به این هدف رسید .

About MDE files (MDB)

If your database contains Microsoft Visual Basic for Applications (VBA) (http://barnamenevis.org/forum/#) code, saving your Microsoft Access database (http://barnamenevis.org/forum/#) as an MDE file compiles all modules, removes all editable source code, and compacts the destination database. Your Visual Basic code will continue to run, but it cannot be viewed or edited. Saving your database as an MDE file helps protect your forms and reports without requiring users to log on or requiring you to create and manage the user accounts (http://barnamenevis.org/forum/#) and permissions (http://barnamenevis.org/forum/#) that are needed for user-level security (http://barnamenevis.org/forum/#). Your database will continue to function as it did— -you can still update data and run reports.
Saving your Access database as an MDE file prevents the following actions:

Viewing, modifying, or creating forms, reports, or modules in Design view.
Adding, deleting, or changing references to object libraries or databases.
Changing code— an MDE file contains no source code.
Importing or exporting forms, reports, or modules. However, tables, queries, data access pages (http://barnamenevis.org/forum/#), and macros can be imported from or exported to non-MDE databases.