本文介绍了点对爆炸(再次!!)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经讨论了很多次了,我不希望再次讨论
但是我有一个特别的问题。


在表单的代码中,我总是使用点表示法来引用表单记录源中的

字段或表单上的控件。对于

示例,即使对名称为CustomerID的表单没有控制权,Me.CustomerID也是记录源中客户ID的值

我将一个控件放在Form上,其Control Source为CustomerID,我将
命名为CustomerID。


到目前为止,非常好。


当我使用Me.CustomerID来引用一个记录源字段而没有

在表单上有相应的控件时,它在我的

计算机(以及其他一些计算机)上正常工作但是当我将代码发送给一个

特定的人时,它不起作用 - 通常的''方法或数据成员

未找到''发生。然后,我们需要在Form上放置一个名为CustomerID

的控件,并使其不可见。这似乎是非常不必要的。


我应该在这台其他机器上寻找什么才能让它工作,因为我想要b $ b? Access中有一些(隐藏)设置会影响这个吗?

我知道我可以使用!但是不想(为了好好踩踏

的原因)。我想了解这个具体问题。

I know this subject has been discussed many times and I do not wish to
go over all the ground again but I have a particular problem.

In the code for a Form I always use the dot notation to refer to a
field in the Form''s Record Source or to a control on the Form. For
example Me.CustomerID is the value of CustomerID in the Record Source
even if there is no control on the Form whose name is CustomerID. If
I place a control on the Form with its Control Source as CustomerID, I
would name it CustomerID as well.

So far, so good.

When I use Me.CustomerID to refer to a Record Source field without
having a corresponding control on the Form, it works correctly on my
computer (and on a number of others) but when I send the code to one
particular person, it does not work - the usual ''Method or data member
not found'' occurs. We then need to place a control named CustomerID
on the Form and make it invisible. This seems to be so unnecessary.

What should I look for on this other machine to get it to work as I
expect? Is there some (hidden) setting in Access which affects this?
I know that I could use ! but do not want to (for well trodden
reasons). I want to understand this specific problem.

推荐答案




为什么要试图绕过潜在的错误。如果我有一个解决方案

适用于所有计算机而不适用于某些计算机,我将使用一个适用于所有计算机的




通过排除字段,您是否试图保存5或6个字节的磁盘

空间?如果你有隐藏的字段,表单看起来很难看?


也许你的问题会产生关于控制源的讨论,

对象命名,排序,过滤器和类似。在我的情况下,我只是看到一个

问题在您的情况下很容易纠正。再一次,我会早点有一些东西可以用来兼职的东西。



Why bother attempting to bypass potential errors. If I had a solution
that worked on all computers vs one that works on some, I''d use the one
that works on all.

By excluding fields, are you attempting to to save 5 or 6 bytes of disk
space? The form looks ugly if you have hidden fields on it?

Maybe your question will genenerate a discusstion on control sources,
object naming, sorts, filters and the like. In my case, I simply see a
problem easily corrected in your situation. Again, I''d sooner have
something that worked all the time that something that worked part time.







我认为到目前为止,这对你来说是偶然的事实 - 它b / b
听起来像是灾难的秘诀。我知道你不是在找人,而是说不要这样做。但我敢打赌,你得到的每一个回复都会说明这一点 - 这不是一个好主意。



I think that the fact this has worked so far for you is fortuitous - it
sounds like a recipe for disaster. I know you were not looking for people to
say "don''t do this" but I''ll bet that every response you get will say
exactly that - it''s not a good idea.


这篇关于点对爆炸(再次!!)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 20:56