vba MS-Access Debug Watch 值长度有限
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19280307/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MS-Access Debug Watch value length is limited
提问by Mark C
I am working in MS-Access 2010 and I am trying to view a variable defined in the VBA code where it has hit a break-point. The problem in the watch window the value text box in the Watches window has a set size, in other words if the value is to long the value is cut-off in the Watches window
我在 MS-Access 2010 中工作,我试图查看在 VBA 代码中定义的变量,该变量已达到断点。watch 窗口中的问题 Watches 窗口中的值文本框有一个设置大小,即如果值太长,则值在 Watches 窗口中被截断
How can I view the whole value inside my variable?
如何查看变量中的整个值?
回答by enderland
It is best to use the intermediate window for this. I frequently do this with SQL queries for this reason.
为此最好使用中间窗口。出于这个原因,我经常使用 SQL 查询来执行此操作。
To show this, use "View--> Intermediate Window" (or Control+G).
要显示这一点,请使用“视图--> 中间窗口”(或 Control+G)。
Then use syntax like the following:
然后使用如下语法:
debug.print "This is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long string"
And you can select and copy/paste out of the intermediate window or scroll to see the whole variable.
您可以选择并复制/粘贴到中间窗口或滚动查看整个变量。
Note that the intermediate window does not get cleared automatically but you can select everything and delete it whenever you want.
请注意,中间窗口不会自动清除,但您可以选择所有内容并随时删除它。