Bẫy lỗi trong Access bằng VBA

Thảo luận trong 'Access và VBA' bắt đầu bởi vuthuanbkvn, 15/1/09.

  1. vuthuanbkvn

    vuthuanbkvn New Member Hội viên mới

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Mình mở mục này mong các bạn có kinh nghiệm nghiên cứu các lỗi trong access tìm cách khắc phục và giải thích cùng hiểu. Như mục giới thiệu rất kỹ của bạn Phát mình tóm tắt như sau:
    Trong access có các sự kiện(event) và các thủ tục (procedure) ... các bạn tìm đọc thêm.
    Khi ta tạo 1 form để nhập thì cần tạo các nút thực thi nhiệm vụ như: xóa,sửa,lưu,không lưu......
    Khi đó sẽ hiện các lỗi mà ta bắt gặp. Để hiện thông báo lỗi và nhắc nhở người dùng ta vào sự kiện(event ) của Form đó và lựa chọn OnError sẽ vào VBA .
    ví dụ tôi sử dụng code sau:
    Private Sub Form_Error(DataErr As Integer, Response As Integer)
    Const SaiDuLieu = 2113
    Const Rong = 2107 ' khai ba?o h??ng na?y co? ti?nh châ?t minh ho?a cho select case
    Const TaoLao = 1670 ' khai ba?o h??ng na?y co? ti?nh châ?t minh ho?a cho select case
    Const Trungkhoa = 3022
    Const khoachinh = 3058
    Const truongtrong = 3314
    Const khonggiatri = 2046
    Dim strMsg As String

    Select Case DataErr
    Case SaiDuLieu
    Response = acDataErrContinue
    strMsg = "Ban kiem tra lai du lieu da nhap xem da dung chua?. "
    MsgBox strMsg, , "Bao loi !"
    Case Rong
    Response = acDataErrContinue
    strMsg = "Ban khong the luu lai vi du lieu de trong?"
    MsgBox strMsg, , "Bao loi!"
    Case Trungkhoa
    Response = acDataErrContinue
    strMsg = "Trung khoa chinh?"
    MsgBox strMsg, , "Bao loi!"
    Case truongtrong
    Response = acDataErrContinue
    strMsg = "co it nhat 1 truong chua duoc nhap theo yeu cau"
    MsgBox strMsg, , "Bao loi!"
    Case khoachinh
    Response = acDataErrContinue
    strMsg = " khoa chinh de trong?"
    MsgBox strMsg, , "Bao loi!"
    Case khonggiatri
    Response = acDataErrContinue
    strMsg = " Lenh khong thuc hien duoc?"
    MsgBox strMsg, , "Bao loi!"
    Case Else
    Response = acDataErrContinue
    strMsg = "Co mot loi da phat sinh? "
    MsgBox strMsg, , "bao loi!"
    End Select
    End Sub
    -----------------------------------------------------------------------------------------
    Mình upload các lỗi trong Access mà có thể gặp,nhưng toàn English mình đọc nhiều cái cũng rất khó hiểu. Nếu bạn nào có kinh nghiệm dịch những cái cần thiết,hoặc bạn nào gặp rồi mà không rõ thì thảo luận nha.
    tAccessAndJetErrors
    ErrorCode ErrorString
    5 Invalid procedure call or argument
    6 Overflow
    7 Out of memory
    9 Subscript out of range
    10 This array is fixed or temporarily locked
    11 Division by zero
    13 Type mismatch
    14 Out of string space
    16 Expression too complex
    17 Can't perform requested operation
    18 User interrupt occurred
    28 Out of stack space
    47 Too many DLL application clients
    48 Error in loading DLL
    49 Bad DLL calling convention
    51 Internal error
    52 Bad file name or number
    53 File not found
    54 Bad file mode
    55 File already open
    57 Device I/O error
    58 File already exists
    59 Bad record length
    61 Disk full
    62 Input past end of file
    63 Bad record number
    67 Too many files
    68 Device unavailable
    70 Permission denied
    71 Disk not ready
    74 Can't rename with different drive
    75 Path/File access error
    76 Path not found
    93 Invalid pattern string
    96 Unable to sink events of object because the object is already firing events to the maximum number of event receivers that it supports
    97 Can not call friend function on object which is not an instance of defining class
    98 A property or method call cannot include a reference to a private object, either as an argument or as a return value
    -----------------------------------------------------------------------------------------
    và tiếp ....
    321 Invalid file format
    322 Can't create necessary temporary file
    325 Invalid format in resource file
    380 Invalid property value
    381 Invalid property array index
    382 Set not supported at runtime
    383 Set not supported (read-only property)
    385 Need property array index
    387 Set not permitted
    393 Get not supported at runtime
    394 Get not supported (write-only property)
    422 Property not found
    423 Property or method not found
    424 Object required
    429 ActiveX component can't create object
    430 Class does not support Automation or does not support expected interface
    432 File name or class name not found during Automation operation
    438 Object doesn't support this property or method
    440 Automation error
    442 Connection to type library or object library for remote process has been lost. Press OK for dialog to remove reference.
    443 Automation object does not have a default value
    445 Object doesn't support this action
    446 Object doesn't support named arguments
    447 Object doesn't support current locale setting
    448 Named argument not found
    449 Argument not optional
    450 Wrong number of arguments or invalid property assignment
    451 Property let procedure not defined and property get procedure did not return an object
    452 Invalid ordinal
    453 Specified DLL function not found
    454 Code resource not found
    455 Code resource lock error
    457 This key is already associated with an element of this collection
    458 Variable uses an Automation type not supported in Visual Basic
    459 Object or class does not support the set of events
    460 Invalid clipboard format
    461 Method or data member not found
    462 The remote server machine does not exist or is unavailable
    463 Class not registered on local machine
    481 Invalid picture
    482 Printer error
    735 Can't save file to TEMP
    744 Search text not found
    746 Replacements too long
    2001 You canceled the previous operation.@@@1@5738@1
    2002 You tried to perform an operation involving a function or feature that was not installed in this version of Microsoft Office Access.@@@1@@1
    2004 There isn't enough memory to perform this operation. Close unneeded programs and try the operation again.
    2005 There isn't enough free memory to start Microsoft Office Access.@Close unneeded programs and try again. For information on freeing memory, search the Microsoft Windows Help index for 'memory, troubleshooting'.@@1@@3
    2006 The object name '|' you entered doesn't follow Microsoft Office Access object-naming rules.@For more information about naming objects, click Help.@@2@553714184@1
    2007 You already have an open database object named '|.'@Use a different name for each database object of the same type. If you want this object to replace the original object, close the original object, and then save this object using the same name. For more information on renaming a database object, click Help.@@2@209043@1
    2008 You can't delete the database object '|' while it's open.@Close the database object, and then delete it.@@1@@1
    2009 You can't rename the database object '|' while it's open.@Close the database object, and then rename it.@@1@@1
    2010 You can't delete the database object '|' while it's open.@Close the database object, and then delete it.@@1@@1
    2011 The password you entered is incorrect.
    2014 You have given this |1 the same name as an existing |2 in your database.@You can't give a table and a query the same name.@Give this object a name that isn't already used by another table or query.@1@@1
    2015 There are no registered wizards of this type.@Rerun Microsoft Office Access or Microsoft Office Setup to reinstall the wizards. If you want to preserve your security or custom settings, back up the Microsoft Office Access workgroup information file. For more information on backing up files, search the Microsoft Windows Help index for 'backing up files'.@@1@@1
    2016 You can't modify the attributes of System Tables.
    2017 Microsoft helps protect this Visual Basic for Applications Project with a password. You must supply the password in the Visual Basic Editor before you can perform this operation.@@@1@@1
    2018 The data access page name '|' you entered is misspelled or refers to a data access page that isn't open or doesn't exist.@@@1@@1
    2019 The number you used to refer to the data access page is invalid.@Use the Count property to count the open data access pages and make sure that the page number is not greater than the number of open data access pages minus one.@@1@2019460@1
    2020 The data access page theme name '|' you entered is misspelled or refers to a theme name that doesn't exist.@@@1@@1
    2021 One or more operators in the filter expression is invalid.@For a valid list of operators refer to the help file@@1@@1
    2022 You entered an expression that requires a data access page to be the active window.@@@1@5601@1
    2023 The file name you specified for the data access page already exists.@@@1@5601@1
    2024 The report snapshot was not created because you don't have enough free disk space for temporary work files.@To fix this, free up disk space (for example, empty the Recycle Bin or delete unnecessary files).@@1@@1
    2025 The file is not in the correct format for a Microsoft Office Access project.@@@1@@1
    2026 Your computer is missing at least one of the Microsoft Access 97 object libraries. Your converted database will not work until you open this database using Access 97 and then fix any missing references. @Press OK to continue saving this database in the Access 97 format with missing references, or press Cancel if you no longer wish to save this database.@@4@@2
    2027 This operation is not supported for Microsoft Office Access 1.X databases.@@@1@@1
    2028 Microsoft Office Access was unable to close the database object.
    2029 Microsoft Office applications cannot suspend while you have documents open from a network location. Exit the applications or close the open documents and try again.
    2030 The Microsoft Office Access project '|' will be opened read-only because one of the following occurred:mad:The file is locked for editing by another user, or the file (or the folder in which it is located,) is marked as read-only, or you specified that you wanted to open this file read-only.@@1@@1
    2031 You can't convert or enable an MDE file.@@@1@@1
    2032 Some errors happened during the conversion. No converted database was generated.@@@1@@1
    2033 Name conflicts with existing module, project, or object library.@@@1@@1
    2034 Cannot Compile Project.@@@1@@1
    2035 Cannot Load Project of wrong version.@@@1@@1
    2036 Microsoft Office Access does not support using ADP Projects when running in Runtime Mode.@@@1@@1
    2037 Microsoft Office Access could not perform name AutoCorrect during this operation. The 'Log name AutoCorrect' option is set, but the Data and Misc. Objects is not checked out.@@@1@@3
    2038 The file '|' cannot be opened because it has been locked by another user.
    2039 You cannot convert a workgroup file from Microsoft Access2000 to Access 97. You must create new security settings in Access 97.
    2040 Microsoft Office Access can't run.@@@1@@3
    2041 Microsoft Office Access couldn't find file '|'. This file is required for startup.
    2042 A system error occurred, or there isn't enough free memory to start Microsoft Office Access. Close unneeded programs and try again.
    2043 Microsoft Office Access can't find the database file '|.'@Make sure you entered the correct path and file name.@@1@@1
    2044 You can't exit Microsoft Office Access now.@If you're running a Visual Basic module that is using OLE or DDE, you may need to interrupt the module.@@1@@1
     
    Chỉnh sửa cuối: 15/1/09
  2. vuthuanbkvn

    vuthuanbkvn New Member Hội viên mới

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA

    và tiếp ....
    32045 The command line you used to start Microsoft Office Access contains an option that Microsoft Office Access doesn't recognize.@Exit and restart Microsoft Office Access using valid command-line options.@@1@@1
    2046 The command or action '|' isn't available now.@* You may be in a read-only database or an unconverted database from an earlier version of Microsoft Office Access. * The type of object the action applies to isn't currently selected or isn't in the active view.@Use only those commands and macro actions that are currently available for this database.@1@@1
    2048 There isn't enough free memory to open the file '|.'@Close unneeded programs and try again. For more information on freeing memory, search the Microsoft Windows Help index for 'memory, troubleshooting'.@@1@@1
    2049 The Tahoma font is not present. To restore it, please run Detect and Repair from the Help menu.
    2050 Enter an OLE/DDE Timeout setting from 0 through 300 seconds.@@@1@@1
    2051 The object name '|1' can't be longer than |2 characters according to Microsoft Office Access object-naming rules.@@@1@@1
    2052 There isn't enough free memory to update the display. Close unneeded programs and try again.
    2053 The command name can't be blank.@Please choose a name.@@1@@1
    2054 Microsoft Office Access is unable to load the Visual Basic for Applications dynamic-link library (DLL) Vbe6.@Rerun the Microsoft Office Access Setup program.@@1@@3
    2055 The expression '|' you entered is invalid.@@@1@311732@1
    2056 Microsoft Office Access can't supply context-sensitive Help.@@@1@@1
    2057 There isn't enough stack memory left to perform the operation.@The operation is too complicated. Try simplifying the operation.@@1@@3
    2058 The file '|' is incompatible. Microsoft Office Access needs to be reinstalled.@Run Setup to reinstall Microsoft Office Access. If you want to preserve your security or custom settings, back up the Microsoft Office Access workgroup information file. For more information on backing up files, search the Microsoft Windows Help index for 'backing up files'.@@1@@3
    2059 Microsoft Office Access cannot find the object '|'.@Make sure the object exists and that you spell its name correctly.@@1@@1
    2060 You can't create a field list based on the action query '|.'@Action queries don't have fields. A form or report must be based on a table, or on a select or crosstab query.@Change the RecordSource property for the form or report, or open the action query and change it to a select query.@1@209232@1
    2061 Enter a zero or greater-than-zero number for this option.@@@1@@1
    2062 The command name must be shorter than 255 Characters.@Please choose a name.@@1@@1
    2063 Microsoft Office Access can't create, open, or write to the index file '|'; the information (.inf) file it uses to keep track of dBASE indexes.@The index file may be damaged, or you may not have read/write permission for the network drive you're trying to link to.@You can link to the dBASE file without specifying any dBASE indexes, but the existing indexes will not be used with the linked table.@1@@1
    2064 The menu bar value '|' is invalid.@You supplied an argument to the DoMenuItem method that refers to a menu bar that is invalid.@Use an intrinsic constant or numeric value that refers to a valid menu bar value, such as acFormbar.@1@611895@1
    2065 The name for the menu, command, or subcommand you entered is invalid.@You supplied an argument to the DoMenuItem method that refers to a menu name, command, or subcommand that is invalid.@Use an intrinsic constant or numeric value that refers to a valid menu, command, or subcommand value, such as acRecordsMenu.@1@611895@1
    2066 A video adapter resolution of at least 640 x 480 pixels is required to run Microsoft Office Access.
    2067 A menu bar macro can only be run if the menu bar macro name is the setting used by particular properties or options.@You tried to run a menu bar macro containing the AddMenu action. Set one of the following properties or options to the name of the menu bar macro: * The MenuBar property of a form or report. * The ShortcutMenuBar property of a form, report, or control. * The Menu Bar or Shortcut Menu Bar option in the Startup dialog box. This error also occurs if Microsoft Office Access attempts to run a menu bar macro containing an AddMenu action that follows an action that makes some other object the active object. For example, the OpenForm action.@@2@603704@1
    2068 The selected item is customized and doesn't have context-sensitive Help.@For more information on creating custom Help for a form, report, or control, click Help.@@2@110930@1
    2069 The key or key combination |1 in |2 has invalid syntax or is not allowed.@Use the SendKeys syntax to specify the key or key combinations. For the allowed key or key combinations, click Help.@@2@610144@1
    2070 You already assigned the key or key combination |1 in |2 to another macro.@Only the first key or key combination will be used.@@2@610144@1
    2071 The Docking property can't be set to '|1' at this time.@If you want to set the Docking property to '|2', move the toolbar from its current position and try again.@@1@@1
    2072 Successfully imported '|'.
    2073 Successfully exported '|'.
    2074 This operation is not supported within transactions.@@@1@@1
    2075 This operation requires an open database.@@@1@@1
    2076 Successfully linked '|'.
    2077 This Recordset is not updatable
    2078 Help isn't available due to lack of memory or improper installation of Microsoft Windows or Microsoft Office Access.@For more information on troubleshooting a low memory problem, search the Microsoft Windows Help index for 'memory, troubleshooting'.@If you need to reinstall Microsoft Office Access, you may want to preserve your security or custom settings. To do so, back up the Microsoft Office Access workgroup information file. For more information on backing up files, search the Microsoft Windows Help index for 'backing up files'.@1@@3
    2079 Form is read-only, because the Unique Table property is not set.
    2080 The toolbar or menu | already exists.@Do you want to replace the existing toolbar or menu?@@19@@2
    2081 The Create From Macro command only works when a macro is selected in the Database window.@@@1@@1
    2082 Only fields from the Unique Table can be edited.
    2083 The database '|' is read-only.@You can't save changes made to data or object definitions in this database.@@1@@1
    2084 Field '|' is based on an expression and can't be edited
    2085 The ODBC Refresh Interval setting must be from 1 through 32,766 seconds.@@@1@@1
     
    Chỉnh sửa cuối: 15/1/09
  3. vuthuanbkvn

    vuthuanbkvn New Member Hội viên mới

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA

    2086 Recordset requires a form to be updatable.
    2087 Microsoft Office Access can't display the Add-ins submenu.@The Add-ins submenu expression '|' you entered exceeds the 256-character limit.@Shorten the macroname or functionname expression in the Menu Add-ins key of the Windows Registry setting, and then restart Microsoft Office Access. For more information on customizing Microsoft Office Access settings in the Windows Registry, click Help.@2@109015@3
    2088 Microsoft Office Access can't display the Add-ins submenu | because a setting you entered in the Windows Registry is missing a macro name or function name expression.@@Supply the missing expression in the Menu Add-ins key of the Windows Registry, and then restart Microsoft Office Access. For more information on customizing Microsoft Office Access settings in the Windows Registry, click Help.@2@109015@3
    2089 Microsoft Office Access can't display the same menu more than once in a menu bar.@@@1@603704@1
    2090 An action within the current global menu's macro group can't change the global menu bar.@Microsoft Office Access can't display the global menu bar because the macro called when you first set the global menu includes another action that tries to reset the global menu.@Check your menu bar macros, and make sure that you set the global menu bar only once.@1@@1
    2091 '|' is an invalid name.@@@1@@1
    2092 The value you specified for the setting argument in the SetOption method isn't the correct type of Variant for this option.@You specified a string when Microsoft Office Access expected a number.@Check the Options dialog box (Tools menu) to see what type of data is required to set this particular option. For example, the setting for the Default Database Folder option must be a string. To see what type of Variant you passed to the SetOption method, use the VarType function. For more information, search the Help index for 'Variant data type' and 'VarType function'.@1@@1
    2093 The numeric value for the setting argument in the SetOption method doesn't correspond to any list box or option group settings in the Options dialog box.@Valid settings are 0 (the first item in the list) through | (the last item in the list).@@1@606210@1
    2094 Microsoft Office Access can't find the toolbar '|.'@You tried to run a macro that includes a ShowToolbar action or a Visual Basic procedure that includes a ShowToolbar method. * The toolbar name may be misspelled. * This action may refer to a custom toolbar that was deleted from or renamed in the current database. * This action may refer to a custom toolbar that exists in a different database.@@1@606458@1
    2095 Microsoft Office Access can't switch to |.@The Microsoft application you tried to open can't be found or hasn't been installed on your computer.@@1@@3
    2096 Microsoft Office Access can't open the Microsoft Office application because it can't find the dynamic-link library Mstool32.@Run Setup to reinstall Microsoft Office Access. If you want to preserve your security or custom settings, back up the Microsoft Office Access workgroup information file. For more information on backing up files, search the Microsoft Windows Help index for 'backing up files'.@@1@@3
    2097 The table you tried to create an import/export specification for was created in an earlier version of Microsoft Office Access.@Convert this database to the current version of Microsoft Office Access by using the Convert Database command (Tools menu, Database Utilities submenu).@@1@@1
    2098 The operation could not be completed because the Smart Tag '|' is not recognized by your system
    2100 The control or subform control is too large for this location.@The number you entered for the Left, Top, Height, or Width property is too large or is a negative number.@Reduce the size of the control or subform control, or enter a positive number.@1@@1
    2101 The setting you entered isn't valid for this property.@To see the valid settings for this property, search the Help index for the name of the property.@@1@@1
    2102 The form name '|' is misspelled or refers to a form that doesn't exist.@If the invalid form name is in a macro, an Action Failed dialog box will display the macro name and the macro's arguments after you click OK. Open the Macro window, and enter the correct form name.@@1@@1
    2103 The report name '|' you entered in either the property sheet or macro is misspelled or refers to a report that doesn't exist.@If the invalid report name is in a macro, an Action Failed dialog box will display the macro name and the macro's arguments after you click OK. Open the Macro window, and enter the correct report name.@@1@@1
    2104 You entered the control name '|,' which is already in use.@You already have a control on the form with this name, or an existing control has its name mapped to this name for Visual Basic. Visual Basic maps spaces in control names to underscores. For example, My Control and My_Control are treated as duplicate names.@@1@611734@1
    2105 You can't go to the specified record.@You may be at the end of a recordset.@@1@@1
    2106 | errors occurred when you loaded the form or report.@You loaded a form or report that has controls or properties that Microsoft Office Access doesn't recognize and will ignore.@@1@@1
    2107 The value you entered doesn't meet the validation rule defined for the field or control.@To see the validation rule, click Design view, click the appropriate field, and then, if the property sheet isn't open, click the Properties button on the toolbar. Then click the Data tab.@To solve this problem, enter a value that meets the validation rule, or press ESC to undo your changes.@1@211730@1
    -----------------------------------------------------------------------------------------
    Mình định upload hết lỗi lên cho các bạn tiện nhìn và kiểm tra nhưng nhiều quá. Các bạn tải links sau về và tự xem nha. Có lỗi nào mình cùng trao đổi
    http://www.box.net/shared/q3zm2gzgot
     
    Chỉnh sửa cuối: 15/1/09
  4. behattieu

    behattieu New Member Hội viên mới

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA

    Theo mình được biết người ta hay dùng 1 table chứa mã lỗi và diễn giải lỗi. Cứ gặp lỗi phát sinh thì nó sẽ tìm trong table dòng dữ liệu có mã lỗi trùng với mã lỗi phát sinh sau đó đưa ra diễn giải lỗi, việc đó rất đơn giản. Hình như có cách lấy tự động các mã lỗi và diễn giải lỗi này thì phải lâu không xem nên không nhớ. Gặp lỗi nào thường xuyên thì bạn dịch ra tiếng việt còn không cứ để tiếng anh cũng được.
     
  5. vuthuanbkvn

    vuthuanbkvn New Member Hội viên mới

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA

    Như các bạn đã góp ý: Nếu dựa vào lời mô tả lỗi trên thì thật khó hiểu, bản thân mình khi gặp lỗi mà tra lại ở bảng trên cũng thấy rất khó,vì vậy mình lập 1 topic này mong anh em trợ giúp mình và mọi người hiểu hơn để dễ dàng khắc phục và làm chương trình pro hơn. Mình có ít kinh nghiệm và mới tiếp cận ACCESS nên còn nhiều cái sai sót và không có kinh nghiệm nhiều,gia nhập diễn đàn này mong học hỏi ở anh em, Mình sẽ cố gắng liệt kê những gì mình học được mong anh em bổ xung thêm phần nỗi và có gì sai mong sửa cho chính xác.
     
  6. behattieu

    behattieu New Member Hội viên mới

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA

    Thấy bạn quan tâm nên mình tìm lại cái code tạo thông báo lỗi để cho anh em tham khảo
    1. Tạo table"tbl_loi" có 2 trường dữ liệu : errorcode và errorstring
    2. Tạo 1 form (form1 có 1 nút lệnh cmdStart)
    3. Gõ chuỗi lệnh này vào cmdStart
    Dim db As DAO.Database
    Dim rst As DAO.Recordset
    Set db = CurrentDb()
    Set rst = db.OpenRecordset("tbl_loi", dbOpenDynaset)
    For lngcode = 1 To 10000
    On Error Resume Next
    Err.Raise lngcode
    DoCmd.Hourglass True
    If Err.Description <> maloi Then
    rst.AddNew
    rst.Fields(0) = Err.Number
    rst.Fields(1) = Err.Description
    rst.Update
    End If
    Err.Clear
    Next lngcode
    rst.Close
    DoCmd.Hourglass False
    MsgBox " da tao xong"

    4 . Hết ::mua::mua:
    -----------------------------------------------------------------------------------------
    Nhân cơ hội này có bác nào tạo được 1 trang php(hoặc asp) dùng để việt hóa code cho anh em với.
    Mô tả:
    Tạo 1 trang php có 4 trường dữ liệu chính: errorcode, errorstring, errorstringV, check với errorcode là mã lỗi, errorstring là diễn giải lỗi tiếng anh , errorstringV là diễn giải lỗi tiếng việt và check là đã được dịch ra tiếng việt.
    Trên trang này có 1 nút lệnh dùng để sort những lỗi chưa được việt hóa và 1 nút cho toàn bộ lỗi. Như thế việc việt hóa các lỗi này rất nhanh và chính xác.
     
    Chỉnh sửa cuối: 17/1/09
  7. muontennguoi

    muontennguoi New Member Thành viên BQT Super Moderators

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA


    Theo quan điểm cá nhân tôi thì các thông báo lỗi đó là dành cho lập trình viên chứ không phải dành cho các user.

    Đã là lập trình viên mà không đọc nổi mấy câu thông báo lỗi tiếng Anh đó thì ... bó chiếu!

    Cho dù có dịch ra tiếng Việt thì thông báo lỗi đó cũng không thể hiển thị ra cho user đọc.
    Nếu nó hiển thị ra cho user thì nghĩa là chương trình đó còn lỗi, chưa chạy được.
    Hiển thị thông báo lỗi dù là tiếng Anh hay tiếng Việt cũng chẳng giúp gì cho user, chẳng làm tăng thêm chút thiện cảm nào của họ với chương trình cả.
     
  8. vuthuanbkvn

    vuthuanbkvn New Member Hội viên mới

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA

    Bạn đã hiểu sai ý mình? Khi mình up tất cả lỗi của access lên thì có nghĩa là trong đó có cả lỗi dành cho lập trình phải hiểu và có những nỗi rất cơ bản dành cho user khi thao tác nhầm hay thao tác sai trên form mà?
    ví dụ các lỗi sau cần nhắc nhở user cho người biết?
    Đây lưu ý là bẫy lỗi hay gặp khi người sử dụng chương trình thao tác :
    lỗi: 3022
    MsgBox “Trùng khóa chính.”
    lỗi :3058
    MsgBox “Khóa chính để trống.”
    lỗi: 3314
    MsgBox “Có ít nhất một field chưa nhập theo yêu cầu bắt buộc.”
     
  9. muontennguoi

    muontennguoi New Member Thành viên BQT Super Moderators

    Được cảm ơn:
    0
    Điểm thành tích:
    0
    Ðề: Bẫy lỗi trong Access bằng VBA

    Thì ví dụ như là lỗi 3022: “Trùng khóa chính.”

    Chỉ người thiết kế CSDL mới biết khóa chính là cái gì.

    Đối với người dùng cuối (end user) thì cần thông báo đại loại là: “Mã NVL này đã tồn tại, không được nhập trùng.”

    Tất nhiên, trong form nhập phiếu thu, chi và với cùng mã lỗi đó thì chỗ màu đỏ phải khác đi rồi.
    Kết quả là: không thể gán cố định thông báo cho 1 mã lỗi được.
     

Chia sẻ trang này