PDA

View Full Version : سوال: اجراي برنامه فقط با اكسس 2003



nazanin_90
شنبه 06 اسفند 1390, 16:08 عصر
سلام
اگر بر روي سيستم ما دو آفيس 2007 و 2003 نصب شده باشد ، آيا راهي وجود دارد كه برنامه فقط با اكسس 2003 اجرا شود و اگر خواستيم آن را از طريق اكسس2007 اجرا كنيم برنامه بصورت اتوماتيك از طريق اكسس 2003 اجرا شود . اين كاربيشتر براي استفاده از برنامه اكسل 2003 ميخواهم انجام شود . چون وقتي ميخواهم از محيط اكسس2007 گزارشي به اكسل ارسال نمايم خطا صادر ميشود (با عنايت به تاپيك اينجا (http://barnamenevis.org/showthread.php?292528-ارسال-گزارش-به-اکسل-در-اکسس-2007&highlight=%D8%A7%D8%B1%D8%B3%D8%A7%D9%84+%D8%A8%D9 %87+%D8%A7%D9%83%D8%B3%D9%84) :

با تشكر

wolfstander
یک شنبه 07 اسفند 1390, 07:36 صبح
اکسس 2007 خیلی باگ داره
شما یا 2003 یا 2010 رو استفاده کن
در مورداینکه اگه 2003 نبود، ارور بده، میتونی تو همین فروم جستجو کنی
کدش هست

c4soft
دوشنبه 08 اسفند 1390, 22:13 عصر
اکسس 2007 خیلی باگ داره


با سلام
دوست عزیز میشه در یک تاپیک مجزا به این مورد بپردازید ؟
آیا باگ های موجود رو شناسایی کردید ؟

wolfstander
سه شنبه 09 اسفند 1390, 09:44 صبح
تاپیک مجزا هست
اولین باگ
هیچ نوع خروجی نمیده
دومین باگ: موقع کدنویسی وقتی شما ctrl+space رو میزنی، تو یه سری دستورات چیزی رو نشون نمیده
و موارد دیگه ای عین اینها که مثلا شما کدنوشتی تو 2003 بعدش تو 2010 کار میکنه ولی تو 2007 کار نمیکنه

انگوران
سه شنبه 09 اسفند 1390, 13:02 عصر
يه مورد هم كه من باهاش مشكل دارم و رو چند تا سيستم هم چك كردم اينه كه دكمه وسط موس كار نميكنه. شايد هم تنظيم خاصي داره كه من نميدونم.

wolfstander
سه شنبه 09 اسفند 1390, 13:56 عصر
به به
سلام
دکمه وسط ماوس که خوبه نباشه
من خودم تو تمام فرمهام، گردش دکمه وسط رو برداشتم با کد
خود 2007 و 2010 پیش فرض از کار انداختنش
فقط امتحان نکردم ببینم با کد میشه راه انداختشون یا نه؟
-*-*-
امتحان کردم
با کد راه نمیفته
*-*-
اما اینجا راه حلشو زده
http://www.accessforums.net/showthread.php/11416-How-do-I-enable-the-mouse-wheel-in-forms

wolfstander
سه شنبه 09 اسفند 1390, 14:07 عصر
این هم متنی که گذاشتن برای فعال کرد چرخش ماوس در اکسس 2010
Scroll records with the mouse wheel

In Access 2003 and earlier, scrolling the mouse jumped records. This caused a range of problems: incomplete records were saved, and people were confused about why their record disappeared when they bumped the mouse. Some developers completely disabled the mouse wheel.

From Access 2007 on, Microsoft gave us a sensible compromise: disable the mouse wheel in Form view, and scroll records in Datasheet and Continuous view.

If you preferred the old approach, you can use the form's Mouse Wheel event to get the old behavior back. Before you do this, you might want to consider whether the new approach is more logical, particularly if anyone else will use your database.

Assuming you are using Access 2007 or later, the steps are:

On the Create tab of the ribbon, in the Other group (rightmost), click the arrow below Macro, and choose Module. Access opens a new module.
Paste in the code below into the module. To verify Access understands it, choose Compile on the Debug menu (in the code window.)
Save the module, with a name such as abjMouseWheel. (The module name is not important, but it must be different to the function name.)
Open your form in design view. On the Event tab of the Properties sheet, set the On Mouse Wheel property to:
[Event Procedure]
Click the Build button (...) beside the property. Access opens the code window. Between the Private Sub ... and End Sub lines, enter:
Call DoMouseWheel(Me, Count)
Repeat steps 4 and 5 for your other forms.
The code

Public Function DoMouseWheel(frm As Form, lngCount As Long) As Integer
On Error GoTo Err_Handler
'Purpose: Make the MouseWheel scroll in Form View in Access 2007 and later.
' This code lets Access 2007 behave like older versions.
'Return: 1 if moved forward a record, -1 if moved back a record, 0 if not moved.
'Author: Allen Browne, February 2007.
'Usage: In the MouseWheel event procedure of the form:
' Call DoMouseWheel(Me, Count)
Dim strMsg As String
'Run this only in Access 2007 and later, and only in Form view.
If (Val(SysCmd(acSysCmdAccessVer)) >= 12#) And (frm.CurrentView = 1) And (lngCount <> 0&) Then
'Save any edits before moving record.
RunCommand acCmdSaveRecord
'Move back a record if Count is negative, otherwise forward.
RunCommand IIf(lngCount < 0&, acCmdRecordsGoToPrevious, acCmdRecordsGoToNext)
DoMouseWheel = Sgn(lngCount)
End If

Exit_Handler:
Exit Function

Err_Handler:
Select Case Err.Number
Case 2046& 'Can't move before first, after last, etc.
Beep
Case 3314&, 2101&, 2115& 'Can't save the current record.
strMsg = "Cannot scroll to another record, as this one can't be saved."
MsgBox strMsg, vbInformation, "Cannot scroll"
Case Else
strMsg = "Error " & Err.Number & ": " & Err.Description
MsgBox strMsg, vbInformation, "Cannot scroll"
End Select
Resume Exit_Handler
End Function
How it works

You can use the code without understanding how it works, but it boils down to just the highlighted line.

The function accepts two arguments:
a reference to the form (which will be the active form if the mouse is scrolling it), and
the value of Count (a positive number if scrolling forward, or negative if scrolling back.)
Firstly, the code tests the Access version is at least 12 (the internal version number for Access 2007), and the form is in Form view. It does nothing in a previous version or in another view where the mouse scroll still works. It also does nothing if the count is zero, i.e. neither scrolling forward nor back.

Before you can move record, Access must save the current record. Explicitly saving is always a good idea, as this clears pending events. If the record cannot be saved (e.g. required field missing), the line generates an error and drops to the error hander which traps the common issues.

The highlighted RunCommand moves to the previous record if the Count is negative, or the next record if positive. This generates error 2046 if you try to scroll up above the first record, or down past the last one. Again the error handler traps this error.

Finally we set the return value to the sign of the Count argument, so the calling procedure can tell whether we moved record.

wolfstander
سه شنبه 09 اسفند 1390, 14:09 عصر
حالا که خواستیم به نتیجه برسیم
این تاپیکی بوده که خود من باز کردم
به جواب هم رسید
http://barnamenevis.org/showthread.php?206585-%D8%AC%D9%84%D9%88%DA%AF%DB%8C%D8%B1%DB%8C-%D8%A7%D8%B2-%D8%A7%D8%AC%D8%B1%D8%A7%DB%8C-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D8%AF%D8%B1-%D9%81%D8%B1%D9%85%D8%AA%DB%8C-%D8%BA%DB%8C%D8%B1-%D8%A7%D8%B2-2003&highlight=%D9%81%D9%82%D8%B7+2003
حالا شما هم ازش استفاده کن