如何处理Null值? [英] How to deal with Null value?

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

问题描述

我正在努力改进我所做的一些形式/查询。他们按原样工作,但我想让它们变得更好。


首先:我有一个用于数据输入的表格,我想知道是否有字段默认到最后输入的值?我不想为所有领域做这件事,只是某些领域。


第二:我有一个驱动查询的表单,提供日期和工作所需的标准有没有办法使它成为如果没有在某个标准中输入任何值,所有记录都显示在该标准下。它现在的方式我必须在每个领域输入一些东西或什么都没有出现。我希望能够(例如)输入一个工作号码,但没有日期,并显示该工作号码的所有记录。


任何直接建议或参考读书的地方非常感谢。这是一个很棒的网络!谢谢!

I am trying to refine some forms/querys that I have made prevously. They work as they are but I want to make them better.

First: I have a form used for data entry and I would like to know if there is away to have a field default to the last value entered? I don''t want to do this for all the fields, just certain ones.

Second: I have a form that drives a query, providing the criteria needed for the dates and job numbers, etc. Is there a way to make it so that if no value is entered in a certain criteria that all records show under that criteria. The way it is now I have to enter something in each field or nothing shows up. I would like to be able to (for example) enter a job number but no date and have all records for that job number show up.

Any direct advice or reference to places to read up on this would be greatly appreciated. This is a great network! Thanks!

推荐答案


我正在尝试改进我所做的一些形式/查询。他们按原样工作,但我想让它们变得更好。


首先:我有一个用于数据输入的表格,我想知道是否有字段默认到最后输入的值?我不想为所有领域做这件事,只是某些领域。


第二:我有一个驱动查询的表单,提供日期和工作所需的标准有没有办法使它成为如果没有在某个标准中输入任何值,所有记录都显示在该标准下。它现在的方式我必须在每个领域输入一些东西或什么都没有出现。我希望能够(例如)输入一个工作号码,但没有日期,并显示该工作号码的所有记录。


任何直接建议或参考读书的地方非常感谢。这是一个很棒的网络!谢谢!
I am trying to refine some forms/querys that I have made prevously. They work as they are but I want to make them better.

First: I have a form used for data entry and I would like to know if there is away to have a field default to the last value entered? I don''t want to do this for all the fields, just certain ones.

Second: I have a form that drives a query, providing the criteria needed for the dates and job numbers, etc. Is there a way to make it so that if no value is entered in a certain criteria that all records show under that criteria. The way it is now I have to enter something in each field or nothing shows up. I would like to be able to (for example) enter a job number but no date and have all records for that job number show up.

Any direct advice or reference to places to read up on this would be greatly appreciated. This is a great network! Thanks!



1)您可以存储在全局变量中输入的最后一个值,用于在控件输入新记录时填充控件。


2)您可以使用代码修改Query Def .SQL来执行此操作。

1) You could store the last value entered in a global variable that you use to populate the control when they go to enter a new record.

2) You can modify the Query Def .SQL using code to do this.



我正在尝试改进我所做的一些形式/查询。他们按原样工作,但我想让它们变得更好。


首先:我有一个用于数据输入的表格,我想知道是否有字段默认到最后输入的值?我不想为所有领域做这件事,只是某些领域。


第二:我有一个驱动查询的表单,提供日期和工作所需的标准有没有办法使它成为如果没有在某个标准中输入任何值,所有记录都显示在该标准下。它现在的方式我必须在每个领域输入一些东西或什么都没有出现。我希望能够(例如)输入一个工作号码,但没有日期,并显示该工作号码的所有记录。


任何直接建议或参考读书的地方非常感谢。这是一个很棒的网络!谢谢!
I am trying to refine some forms/querys that I have made prevously. They work as they are but I want to make them better.

First: I have a form used for data entry and I would like to know if there is away to have a field default to the last value entered? I don''t want to do this for all the fields, just certain ones.

Second: I have a form that drives a query, providing the criteria needed for the dates and job numbers, etc. Is there a way to make it so that if no value is entered in a certain criteria that all records show under that criteria. The way it is now I have to enter something in each field or nothing shows up. I would like to be able to (for example) enter a job number but no date and have all records for that job number show up.

Any direct advice or reference to places to read up on this would be greatly appreciated. This is a great network! Thanks!



''特定值''或''ALL'场景的标准语法是:

The standard syntax for the ''specific value'' OR ''ALL'' scenario is:

展开 | 选择 | Wrap | 行号


浏览表格上的示例过滤。 ,看看这是否有帮助。当一个项目没有被使用时,它根本就不包含在WHERE子句中。这是允许所有项目的最有效方式。

如果您还有任何问题,请告诉我们。在您了解了有关该主题的更多信息之后,回过头来做的工作总是很有趣。
Have a look through Example Filtering on a Form. and see if this helps. When an item is not used it simply doesn''t include it in the WHERE clause. This is the most efficient way to allow ALL for an item.
Let us know if you still have any questions. It''s always fun coming back to earlier work you''ve done after you''ve learned more about the subject.


这篇关于如何处理Null值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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