以表格形式返回空值和空白标准 [英] Returning Null Values and Blank Criteria in Form

查看:123
本文介绍了以表格形式返回空值和空白标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试获取一个查询,该查询在访问2010中的表单中运行输入值。我想在字段中返回空值,如果没有填写一个框忽略此参数的表单。我一直试图在不创建联合查询的情况下这样做。但这是我到目前为止,但它一直说我有一个语法错误,有时我得到你错过了一个运算符。我知道那些错误意味着什么,但我现在有点陷入困境。请帮助

Hello,
I am trying to get a query that runs off input values in a form in access 2010. I would like to return null values in fields and if a box is not filled out in the form to ignore this parameter. I whave been trying to do this without creating a union query. But this is what I have so far but it keeps saying I have a syntax error and sometime I have gotten you are missing an operator. I know what those errors mean but I am getting a little stuck at the moment. Please help

展开 | 选择 | Wrap | 行号

推荐答案

对于其他任何工作的人来说,这里有更好格式的代码:

For anyone else working on this, here is the code in a nicer format:

展开 | 选择 | Wrap | 行号


Trey,在第22行我发布的代码,尝试删除行尾的结束括号:看看你现在得到了什么。


另外,在第29行通过33,尝试制定标准

Trey, on line 22 of the code that I posted, try removing the ending parenthesis at the end of the line: ) See what you get now.

Also, in lines 29 through 33, try making the criteria be

展开 | 选择 | Wrap | 行号


K i将第一个where子句中的代码更改为测试,它现在将查询,但如果我将表单字段留空,我会收到一个错误,说明这是键入不正确,或者它太复杂而无法评估。如果所有表单字段都已填写,它将运行。

K i changed the code in the first where clause to test and it will query now but if I leave a form field blank i get an error that says This is typed incorrectly, or it is too complex to be evaluated. It will run if all form fields are fillled out.

展开 | 选择 | Wrap | 行号


这篇关于以表格形式返回空值和空白标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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