Hello, I am suppressing the warnings in Ms Access database by using theDoCmd.SetWarnings=False statement. However I want to get a list of allthe Warnings that were generated between a: DoCmd.SetWarnings False and DoCmd.SetWarnings True Please Suggest. Thanks and Regards,Pradeep Varma *** Sent via Developersdex http://www.developersdex.com ***推荐答案 不幸的是,Access没有公开这个值。 您可以创建一个公共变量并自己跟踪它,但是使用Execute方法更好 ,因为它: a)不需要关闭SetWarnings; b)可以给你指示动作查询未能完成; c)可以告诉你受影响的记录数量; d)可用于交易中获取全部或全部结果。 - Allen Browne - Microso ft MVP。西澳大利亚州珀斯。 访问用户提示 - http:// allenbrowne.com/tips.html 回复群组,而不是mvps dot org的allenbrowne。 " Pradeep Varma" < PR *********** @ rediffmail.com>在消息中写道 新闻:rW ************* @ news.uswest.net ... Unfortunatly, Access does not expose this value. You could create a public variable and track it yourself, but it is muchbetter to use the Execute method, since it:a) does not need to turn SetWarnings off;b) can give you an indication of the action query fails to complete;c) can give you an indication of the number of records affected;d) can be used in a transaction to get an all or nothing result. --Allen Browne - Microsoft MVP. Perth, Western Australia.Tips for Access users - http://allenbrowne.com/tips.htmlReply to group, rather than allenbrowne at mvps dot org. "Pradeep Varma" <pr***********@rediffmail.com> wrote in messagenews:rW*************@news.uswest.net...你好, 我使用 DoCmd.SetWarnings = False语句来抑制Access数据库中的警告。但是我想获得一个列表,列出所有在以下之间生成的警告: DoCmd.SetWarnings False和DoCmd.SetWarnings True Hello, I am suppressing the warnings in Ms Access database by using the DoCmd.SetWarnings=False statement. However I want to get a list of all the Warnings that were generated between a: DoCmd.SetWarnings False and DoCmd.SetWarnings True 对不起,我没有找到你。如果Access没有公开它,我怎么能使用 公共变量来跟踪它。我请求你提供 我能够深入了解如何使用公共变量跟踪价值 ,因为它也没有进入错误处理程序。 干杯, Pradeep Varma ***通过Developersdex发送 http://www.developersdex.com *** I am sorry I did not get you. How could I keep track of it using apublic variable if Access does not expose it. I request you to provideme an insight into how i could track the value using a public variableas it does not go into the error handler too. Cheers, Pradeep Varma *** Sent via Developersdex http://www.developersdex.com *** Set每次更改SetWarning时的变量。 示例: 公共bWarnings为布尔值 公共函数DoSetWarning(bOn as Boolean) DoCmd.SetWarnings bOn bwarnings = bOn 结束功能 您现在可以测试bWarnings任何地方,只要你的所有代码通过你的功能切换这个 设置。 - Allen Browne - 微软MVP。西澳大利亚州珀斯。 访问用户提示 - http:// allenbrowne.com/tips.html 回复群组,而不是mvps dot org的allenbrowne。 " Pradeep Varma" < PR *********** @ rediffmail.com>在消息中写道 新闻:YL ************** @ news.uswest.net ... Set your variable every time you change SetWarnings. Example:Public bWarnings As BooleanPublic Function DoSetWarning(bOn as Boolean)DoCmd.SetWarnings bOnbWarnings = bOnEnd Function You can now test bWarnings anywhere, provided all your code toggles thissetting via your function. --Allen Browne - Microsoft MVP. Perth, Western Australia.Tips for Access users - http://allenbrowne.com/tips.htmlReply to group, rather than allenbrowne at mvps dot org. "Pradeep Varma" <pr***********@rediffmail.com> wrote in messagenews:YL**************@news.uswest.net...对不起我做了没有得到你。如果Access没有公开它,我怎么能使用公共变量来跟踪它。我请求您提供一个洞察我如何使用公共变量跟踪值的信息因为它也不会进入错误处理程序。I am sorry I did not get you. How could I keep track of it using a public variable if Access does not expose it. I request you to provide me an insight into how i could track the value using a public variable as it does not go into the error handler too. 这篇关于获取SetWarnings的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-21 23:43