开发者

Microsoft Access Error 2482

I am using MS Access application and I am getting an error on just one user's pc:

Microsoft Error: 2482 - Microsoft Access can't find the name ... you entered in the expression.You may have specified a control that wasn't on the current object without specifying the correct form or report context. To refer to开发者_如何学运维 a control on another form or report, precede the control name with the name of a collection, usually either Forms or Reports, and the name of the form or report to which the control belongs.For example, Forms![Products]![Units In Stock].

Any help will be appreciated Thanks


Check the references in the code window. Missing reference can lead to quite odd error messages and if you are only getting a problem on one PC, a missing reference is not unlikely.

From your recent comment on your post, it seems that http://support.microsoft.com/kb/945674 may be relevant to you. Among the problems listed is:

945280 Combo box controls and list box controls display no value or incorrect values in Access 2003 after you install Office 2003 Service Pack 3


If error message seems very odd, then it can usually be caused by broken references or corrupted file.

If Your application has additional references to other applications like Word or Excel, then it makes distributing to other computers more complicated. I suggest the solution to remove all additional references prior distributing to other computer.

Create the module that does contain minimum functionality and includes a procedure that is called as first action in Autoexec macro. This procedure will add all required procedures on program start up if those are available.

If some reference can not be added, then the application continues to work until some procedure from module that uses not available reference is used. This means that if only one user is using some advanced Excel reporting functionality then other user without Excel can continue working until they call some procedure from module requiring Excel reference.

The sample code for adding references programatically can be found here http://www.tek-tips.com/viewthread.cfm?qid=903662

Note: By painful experience the .IsBroken property of the reference does not always work as expected.

For more complex cases special VBA library for handling references can be found here: http://afrablox.com/Default.aspx?tabid=406&language=en-US I had to distribute complex Microsoft Access application with more than 15 references to other libraries. As a result of long and painful experimenting the special references handling library was born. That suits for cases when mdb or accdb format can be used, because mde and accde files do not allow adding references dynamically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜