MS Access 2003 - 代码运行后打开的参数框的 VBA:自动“确定”?
因此,在 vb 中,按钮单击事件运行 sql 语句后,会打开一个参数框,以便列表框填充数据。像这样:
me.listbox.rowsource = "SELECT tblMain.ID, TblMain.FirstName, TblMain.LastName, tblMain.MobileNumber FROM tblMain;"
然后我计算显示的结果,例如:
me.recordcounter = me.listbox.listcount
出于某种原因,当我单击此按钮事件时,它仍然会抛出一个参数框,用于询问手机号码的查询?如果您只需点击即可浏览我正在寻找的所有结果。有没有一种方法可以让我写一些东西来自动告诉该框已单击“确定”,因此它甚至不会出现?或者这是避免比随机疼痛更糟糕的事情?
谢谢
编辑:
抱歉我刚刚注意到所有内容(所有控件等)都在表单标题中?太多人可以接触到这个,一切都搞砸了。抱歉...在我什至可以提出合法问题之前,还有很多修复工作要做。来自 Cookbook 的 acbSoundex 也在这里并循环播放。不过还是谢谢
So there is a parameter box that open after a button click event runs an sql statement in vb for a list box to populate data. something like:
me.listbox.rowsource = "SELECT tblMain.ID, TblMain.FirstName, TblMain.LastName, tblMain.MobileNumber FROM tblMain;"
then i count the result for display like:
me.recordcounter = me.listbox.listcount
for some reason when I this button click event it still throws up a parameter box for the query asking for a mobile number?? which if you just click through gets you to the browse all results i am looking for. is there a way i can write something that automatically tells that box the ok has been clicked so it doesn't even appear? or is this avoiding something worse than a random pain??
thanks
EDIT:
apologies i just noticed that everything (all controls, etc) are in the form header?? too many people have access to this, its all mucked up. sorry...much fixes to do before I can even ask a legit question. acbSoundex from Cookbook is also in here and throwing this for a loop. thanks though
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果查询包含不在表中/未指定的字段/参数,则会出现参数框。
看起来 MobileNumber 字段(如果您声明的话)可能拼写错误,或者不是底层表/查询的一部分。
验证您提供的查询的表结构是否正确,或者提供表结构以便我们查看。
The parameter box will appear if the query contains a field/param that is not in the table/not specified.
It would seem that the MobileNumber field (if what you state) might be spelled incorrectly, or is not part of the underlyinh table/query.
Verify that you table structure is correct in regards, to the query you supplied, or supply the table structure so that we can have a look.