我在MS-Access 2010中工作,我正在尝试查看在VBA代码中定义的变量,它已经达到了一个断点。监视窗口中“监视”窗口中的值文本框中的问题具有设置大小,换句话说,如果值为“长”,则“监视”窗口中的值将被截断
如何查看变量中的整个值?
答案 0 :(得分:21)
最好使用中间窗口。出于这个原因,我经常使用SQL查询执行此操作。
要显示此信息,请使用“查看 - >中间窗口”(或Control + G)。
然后使用如下语法:
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"
您可以选择并复制/粘贴中间窗口或滚动查看整个变量。
请注意,中间窗口不会自动清除,但您可以随意选择所有内容并将其删除。