pl ***************** @ msn.com http://www.members。 shaw.ca/AlbertKallalKeep in mind, a this point the code will wait unter the above form isclosed, or kicked out of dialog mode. If the form is closed, then you can''tgrab the values from the form...can you?You *can* expose propeites in the above form as long as you declare them aspublic. And, assuming you just read my above article, then you can go:msgbox "My Custom Properity is " & forms("sFormNameInt").MyCustomProp--Albert D. Kallal (Access MVP)Edmonton, Alberta Canada pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal 如何你打算用对话框吗?使用对话框表单意味着所有代码STOPS并等待表单完成。事实上,你甚至不能在这里使用内置的菜单。我认为你在对话形式的概念和模型形式之间感到困惑。 你可以在这里阅读它们: http://www.members.shaw.ca/AlbertKal...log/Index .html 好吧,你可以理解模型表单和对话框表单之间的区别,但要记住以上几点: Ok, it is possible you understand the difference between model forms, and dialog forms, but keeping the above in mind: 请记住,这一点代码将等待上面的表单关闭,或者踢出对话框模式。如果表格已经关闭,那么你就无法从表格中获取价值......你能吗? 你*可以*以上述形式公开propeites只要你宣称他们是公开的。并且,假设您刚刚阅读了我的上述文章,那么您可以去: msgbox" My Custom Properity is" &安培;表格(sFormNameInt)。MyCustomProp Keep in mind, a this point the code will wait unter the above form is closed, or kicked out of dialog mode. If the form is closed, then you can''t grab the values from the form...can you? You *can* expose propeites in the above form as long as you declare them as public. And, assuming you just read my above article, then you can go: msgbox "My Custom Properity is " & forms("sFormNameInt").MyCustomProp 您可以通过对话模式踢出表格(以对话模式打开) 将表单的可见性设置为False(通常使用命令按钮 在对话框模式下打开的表单中)。这样就可以打开表单并且可以访问它的 变量,并允许代码继续通过调用代码中的.OpenForm 调用,这样你就可以获取值,然后执行 表格上的DoCmd.Close。 - ''------------ --- ''John Mishefske ''---------------You can kick the form (opened in Dialog mode) out of Dialog mode bysetting the form''s visibility to False (typically using a command buttonin the form opened in Dialog mode). This leaves the form open and itsvariables accessible and allows code to continue past the .OpenFormcall in the calling code so that you can grab values and then do aDoCmd.Close on the form.--''---------------''John Mishefske''--------------- 这篇关于从表单中调用类的私有方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-25 07:19