查询未运行。 [英] Query not running.

查看:75
本文介绍了查询未运行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表格上有一个组合框,其行来源是

I have a combo box on a form whose row source is

展开 | 选择 | Wrap | 行号

推荐答案

你需要以编程方式重新定义组合框的控制源 - 以下代码将起作用:
You need to programmatically redefine the Control Source of the Combo Box - the following Code will work:
展开 | 选择 | Wrap | 行号


感谢ADezii,但我认为这不会起作用。


我正在扫描所有形式的所有组合框(在可能未知的数据库中)以使用控制源来运行查询。

我接受如果查询需要参数,如[输入日期]或表格!MyForm!MyData它不起作用,但在这种情况下,我们提出一个定义的参数 - Tempvars!DefaultLanguageID,已知为3.


每行来源,因此每个查询都是不同的。


有可能为WHERE子句解析Rowsource并重新构建查询,尽可能提供正确的值,但我怀疑这会非常棘手。


Phil
Thanks ADezii, but I don''t think that will work.

I am scanning all combo boxes in all forms (in possibly unknown databases) to use the Control Source to run the query.
I accept that if the query needs parameters like [Input a Date] or Forms!MyForm!MyData it will not work, but in this case we are presenting a defined paramater - Tempvars!DefaultLanguageID which is known to be 3.

Every Row Source and hence every query will be different.

It may be possible to parse the Rowsource for the WHERE clause and re-build the query supplying the correct values where possible, but I suspect that would be very tricky.

Phil


你需要一个包装函数才能在行源中使用

You''ll need a wrapper function to use in the row sources

展开 | 选择 | Wrap | 行号


这篇关于查询未运行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆