代码问题 [英] Code Issues

查看:52
本文介绍了代码问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有时当我编辑以前保存的VBA代码时,例如要更新字段

名称等,修改后的代码不起作用。

即使我复制并粘贴以前的版本也不行。

唯一的解决方案似乎是删除现有代码,逐字逐句地重新输入
并且嘿presto它有效。


当然你可能会认为拼写错误或其他东西,但它像Access似乎

完全忽略代码。


这可能听起来很愚蠢,但它像Access似乎有以前输入代码的内存是

,它似乎记得早期的代码和

并不想要处理新的东西.....


我想象这个还是有什么我需要做的事情?


几个月前我创建了一堆函数。一些字段

名称已更改,我更新了新代码的查询和函数
。访问拒绝了它。我唯一的解决方案就是删除

模块并重新输入密码。


任何建议


克里斯

解决方案

过去,表格代码停止工作存在问题 -

在那里,但它没有执行。但即使最近的更改没有发生在停止工作的代码上,也会发生错误。有很多关于原因的猜测,但没有明确的答案。


没有人报告它是一致的还是频繁的,我没有''听说它在Access 2002或2003中发生过
。您没有说出您使用的是什么版本的

,所以我不会推测这是不是你有经验值



有些人运气好保存为文字保存表单的模块,然后

从文本加载在类似的情况下。

对不起,我无法提供任何真正的帮助。


Larry Linson

Micosoft Access MVP

" AFKAFB" < CH *********** @ rbos.com>在消息中写道

news:11 ******************** @ z14g2000cwz.googlegrou ps.com ...



有时当我编辑以前保存的VBA代码时,例如要更新字段
名称等,修改后的代码不起作用。
即使我复制并粘贴以前的版本也不起作用。

唯一的解决方案似乎是删除现有的代码,逐字逐句地重新输入,嘿它可以正常工作。

当然你可能会认为拼写错误或类似Access的东西似乎完全无视代码。

这可能听起来很愚蠢,但它像Access似乎有一个以前键入的代码的记忆,它似乎记得早期的代码和
没有''我想要'处理新东西.....

我想象这个还是有什么我需要做的事情?

几个月后我创造了一堆功能前。一些字段名称已更改,我更新了新代码的查询和功能。访问拒绝了它。我唯一的解决方案就是删除那个
模块并重新修改代码。

任何建议

chris



AFKAFB写道:



有时当我编辑以前保存的VBA代码时,例如要更新字段
名称等,修改后的代码不起作用。
即使我复制并粘贴以前的版本也不起作用。

唯一的解决方案似乎是删除现有的代码,逐字逐句地重新输入,嘿它可以正常工作。

当然你可能会认为拼写错误或类似Access的东西似乎完全无视代码。

这可能听起来很愚蠢,但它像Access似乎有一个以前键入的代码的记忆,它似乎记得早期的代码和
没有''我想要'处理新东西.....

我想象这个还是有什么我需要做的事情?

几个月后我创造了一堆功能前。一些字段名称已更改,我更新了新代码的查询和功能。访问拒绝了它。我唯一的解决方案是删除那个
模块并重新修改代码。

任何建议

chris



也许这是反编译可能有帮助的时候。用

/反编译打开应用程序。 EIther或创建一个空白数据库并导入所有

对象以及菜单和imp / exp规范。 Mayber在系统表中有一些需要更正的东西。
。然后将新数据库重命名为你的应用程序的mdb。


沙拉

这是第一次我听说过反编译

你能详细解释一下这是如何工作的,以及我如何用/反编译来启动这个数据库。

问候

克里斯


Hi

Sometimes when i edit previously saved VBA code e.g. To update field
names etc the revised code does not work.
Even if i copy and paste in a previous version it does not work.

The only solution seems to be to delete the existing code, re-type ir
word for word and hey presto it works.

Of course you might think typo or something but its like Access seems
to totally ignore the code.

This may sound daft but its like Access seems to have a memory of
previously typed code and it seems to be remember the earlier code and
does not ''want'' to process the new stuff.....

Am i imagining this or is there something I need to do?

I created stacks of functions a few months ago. Some of the field
names have changed and I updated both the query and the function for
the new code. Access rejected it. My only solution was to delete that
module and re-key the code again.

Any suggestions

chris

解决方案

There has, in the past, been a problem with form code ceasing to work -- it
was there, but it just didn''t execute. But that error happened even if the
most recent changes had not been to the code that stopped working. There was
much speculation as to why, but no definitive answer.

No one has reported it as being either consistent or frequent, and I haven''t
heard of it happening with Access 2002 or 2003. You did not say what version
of Access you are using, so I wouldn''t speculate if this is what you have
experienced.

Some have had luck using "save as text" to save the form''s module and then
"load from text" in similar situations.
Sorry I can''t be of any real help.

Larry Linson
Micosoft Access MVP
"AFKAFB" <ch***********@rbos.com> wrote in message
news:11********************@z14g2000cwz.googlegrou ps.com...

Hi

Sometimes when i edit previously saved VBA code e.g. To update field
names etc the revised code does not work.
Even if i copy and paste in a previous version it does not work.

The only solution seems to be to delete the existing code, re-type ir
word for word and hey presto it works.

Of course you might think typo or something but its like Access seems
to totally ignore the code.

This may sound daft but its like Access seems to have a memory of
previously typed code and it seems to be remember the earlier code and
does not ''want'' to process the new stuff.....

Am i imagining this or is there something I need to do?

I created stacks of functions a few months ago. Some of the field
names have changed and I updated both the query and the function for
the new code. Access rejected it. My only solution was to delete that
module and re-key the code again.

Any suggestions

chris



AFKAFB wrote:

Hi

Sometimes when i edit previously saved VBA code e.g. To update field
names etc the revised code does not work.
Even if i copy and paste in a previous version it does not work.

The only solution seems to be to delete the existing code, re-type ir
word for word and hey presto it works.

Of course you might think typo or something but its like Access seems
to totally ignore the code.

This may sound daft but its like Access seems to have a memory of
previously typed code and it seems to be remember the earlier code and
does not ''want'' to process the new stuff.....

Am i imagining this or is there something I need to do?

I created stacks of functions a few months ago. Some of the field
names have changed and I updated both the query and the function for
the new code. Access rejected it. My only solution was to delete that
module and re-key the code again.

Any suggestions

chris


Perhaps this is a time when decompile might assist. Open the app with a
/decompile. EIther that or create a blank database and import all
objects as well as menus and imp/exp specs. Mayber there is something
that is in the system tables that needs to be corrected. THen rename to
new database to your app''s mdb.


Salad
This is the first time i''ve heard of a decompile
Can you explain in a bit more detail how this works and how i start the
DB wih a /decompile.
regards
chris


这篇关于代码问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆