当组合框填充字段时查询中的标准被忽略 [英] Criteria in a Query Being Ignored When a Field is Populated by a Combo Box

查看:65
本文介绍了当组合框填充字段时查询中的标准被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个静态值表,我正在从另一个表中访问以填充组合框。接下来,我有一个表单,用户可以选择此信息并直接更新到表。一切正常。我可以创建简单的查询和报告,没有问题,也可以更新数据。如果我尝试添加任何标准,即使像使用喜欢一样简单要识别已由组合框填充的表的字段中的值,它将完全忽略它。但是,如果我在不使用组合框填充字段的列中使用相同的功能,它会毫无问题地找到它。


我希望有一个对此的简单解决方案,可能是由于使用组合框或者我需要设置的属性的语法...到目前为止,我找不到答案是不成功的。如果有人对此有任何想法,我当然会感激。谢谢:)

解决方案

抱歉,我忘了提到我使用的是2003版。



我有一个静态值表,我从另一个表中访问以填充组合框。接下来,我有一个表单,用户可以选择此信息并直接更新到表。一切正常。我可以创建简单的查询和报告,没有问题,也可以更新数据。如果我尝试添加任何标准,即使像使用喜欢一样简单要识别已由组合框填充的表的字段中的值,它将完全忽略它。但是,如果我在不使用组合框填充字段的列中使用相同的功能,它会毫无问题地找到它。


我希望有一个对此的简单解决方案,可能是由于使用组合框或者我需要设置的属性的语法...到目前为止,我找不到答案是不成功的。如果有人对此有任何想法,我当然会感激。谢谢:)



当您添加其他条件时,您可能会使查询无法更新。单独打开您的查询并尝试直接更新它。如果你不能,请查看屏幕左下方的访问状态栏。它应该说查询不可更新。如果不是这样,那么它似乎是某种语法错误。


如果查询不可更新,则可以采取多种补救措施应用取决于它不可更新的原因。在任何一种情况下,为了尝试修复它,您需要发布一个您说工作的简单查询,以及您说的忽略您的条件的扩展查询之一。


< blockquote>如果你说运行查询并查看结果是否是我在设计模式下工作时所期望的 - 那么当我输入简单的标准时,例如:


喜欢 Profits5"


在用户输入的某个字段下,然后我得到了我期望的结果。如果我删除它,然后为通过组合框填充的字段之一添加相同类型的条件:


类似于Misc


并运行查询然后我根本没有结果。屏幕左下角没有任何内容。另外,我使用的是使用向导创建的简单Select查询。


I have a table of static values that I am acessing from another table to populate combo boxes. Next I have a form where this information is selected by the user and updates directly to the table. Everything works fine. I can create simple queries and reports with no problem as well as update the data. If I try to add any criteria, even as simple as using "like" to identify a value in a field of the table that has been populated by the combo box, it will completely ignore it. However, if I use the same functionality in a column where a combo box is not used to populate the field, it finds it with no problem.

I am hoping that there''s a simple solution for this, maybe syntax due to the use of a combo box or maybe a property that I need to set... So far I have been unsuccessful in finding the answer. If anyone has any ideas on this one, I would certainly appreciate it. Thanks :)

解决方案

Sorry but forgot to mention that I am using version 2003.


I have a table of static values that I am acessing from another table to populate combo boxes. Next I have a form where this information is selected by the user and updates directly to the table. Everything works fine. I can create simple queries and reports with no problem as well as update the data. If I try to add any criteria, even as simple as using "like" to identify a value in a field of the table that has been populated by the combo box, it will completely ignore it. However, if I use the same functionality in a column where a combo box is not used to populate the field, it finds it with no problem.

I am hoping that there''s a simple solution for this, maybe syntax due to the use of a combo box or maybe a property that I need to set... So far I have been unsuccessful in finding the answer. If anyone has any ideas on this one, I would certainly appreciate it. Thanks :)

It appears that you may be making your query non-updateable when you add the additional criteria. Open your query by itself and try to update it directly. If you can''t, look at the access status bar at the bottom left of the screen. It should say query not updateable. If that is not it, then it would appear to be a syntax error of some kind.

If the query not being updateable is the case, there are a number of remedies that can be applied depending on why it is non-updateable. In either case, in order to try to fix it, you need to post one of the simple queries you say works, and one of the expanded queries that you say "ignores your criteria".


If you are saying run the query and see if the results are what I am expecting while working in design mode - then when I put in simple criteria such as:

Like "Profits5"

under one of the fields that is typed in by the user, then I get exactly what I expect. If I remove that, and then put the same type of criteria for one of fields that was populated via a combo box:

Like "Misc"

and run the query then I get no results at all. There is nothing that appears at the bottom left hand corner of the screen. Also, I am using a simple Select query created from using the wizard.


这篇关于当组合框填充字段时查询中的标准被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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