⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 为查询添加选择准则.htm

📁 非常不错的介绍Access2000的资料
💻 HTM
字号:
<html>
<head>
<!-- #BeginEditable "doctitle" -->
<title>洪恩在线 - Access 2000</title>
<!-- #EndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<link rel="stylesheet" href="/pub/css/home.css">
<link rel="stylesheet" href="/pc/pc.css">
<meta name="keywords" content="电脑,教育,教程,办公软件,microsoft,Office,office,Access,Access 2000,数据库,查询,表">
<link rel="stylesheet" href="oa.css">
</head>

<body bgcolor="white" text="black" topmargin="10" leftmargin="0" marginwidth="0" marginheight="10">
<!--顶部开始--> 
<script language="Javascript" src="/pub/js/head.js"></script>
<!--顶部结束--> 
<table width="760" height="20" border=0 cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td height=20 class="p1" bgcolor="#E8E8E8" align="left"><font color="#000000"><font color="#FF9966">当前位置</font>:<a href="/default.htm">在线教程</a> -&gt; Access 2000</font></td>
  </tr>
</table>
<table width="760" border=0 cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td height="15"></td>
  </tr>
</table>
<table width="760" cellspacing="0" border=0 cellpadding="0" align="center">
  <tr> 
    <td width="145" valign="top" bgcolor="#E8E8E8" align="left" style="color:blue" height="183"> 
      <img src="/pc/img/blank.gif" width="1" height="10" align=center><br>
      <table width="145" border="0" cellspacing="0" cellpadding="0" bordercolor="#F8AC0E" align="center" height="20">
        <tr bgcolor="000099" valign="middle"> 
          <td width="109" align="center" class="p2"><font color="#FFFFFF"><b>Access 
            2000</b></font><font color="#FF3333" ><b></b></font></td>
          <td height="20" bgcolor="#E8E8E8" width="13"> </td>
          <td height="20" bgcolor="#E8E8E8" width="23"> </td>
        </tr>
      </table>
      <p><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"> 
        <a href="ac2k0101.htm">初识Access 2000<br>
        </a></font><font color="#0000CC"> </font></span><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"> 
        <a href="ac2k0201.htm">窗口接口使用简介<br>
        </a></font></span><font color="#0000CC"><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0301.htm">用向导建立数据库</a></span></font><font color="#0000CC"><span class="p1"><a href="ac2k0301.htm"> 
        <br>
        </a><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0401.htm">数据库的结构</a> <span class="p1"><a href="ac2k0403.htm"> 
        </a></span> <br>
        <font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0501.htm">用表向导建立表</a></span></font> <font color="#0000CC"><span class="p1"><a href="ac2k0501.htm"> 
        <br>
        </a><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0601.htm">在表中输入数据</a> <a href="ac2k0601.htm"><br>
        </a><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0701.htm">数据的类型和属性</a><span class="p1"> </span><br>
        </span></font><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0801.htm">定义表之间的关系</a></span><span class="p1"><br>
        <font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0901.htm">建立简单的查询</a></span><span class="p1"> <br>
        <font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        为查询制定规则</span></p>
      <p style="line-height:17pt" align="left"><span class="p1">   为查询添加选择准则<br>
          <a href="ac2k1002.htm">使用表达式生成器</a><br>
          <a href="ac2k1003.htm">表达式的几种常用符号</a><br>
          <a href="ac2k1004.htm">补充内容一</a><br>
          <a href="ac2k1005.htm">补充内容二</a><br>
          <a href="ac2k1006.htm">补充内容三</a><br>
          <a href="ac2k1007.htm">补充内容四</a><br>
          <a href="ac2k1008.htm">补充内容五</a><br>
          <a href="ac2k1009.htm">补充内容六</a><br>
          <a href="ac2k1010.htm">补充内容七</a><br>
          <a href="ac2k1011.htm">补充内容八</a><br>
          <a href="ac2k1012.htm">补充内容九</a><br>
          <a href="ac2k1013.htm">补充内容十</a><br>
          <a href="ac2k1014.htm">补充内容十一</a><br>
          <a href="ac2k1015.htm">补充内容十二</a><br>
        </span><span class="p1"> <br>
        <font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1101.htm">如何建立数据窗体<br>
        </a><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1201.htm">生成数据打印报表</a><br>
        <font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm">为WEB页提供数据<br>
        </a><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm"></a></span><a href="ac2k1401.htm" class="p1">用图表显示数据</a><br>
        <span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm"></a></span><a href="ac2k1501.htm"><span class="p1">宏的使用</span><br>
        </a><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm"></a></span><a href="ac2k1601.htm"><span class="p1">模块与“VBA”语言</span><br>
        </a><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm"></a></span><a href="ac2k1701.htm"><span class="p1">SQL语言妙用</span><br>
        </a><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm"></a></span><a href="ac2k1801.htm"><span class="p1">外部数据的使用</span><br>
        </a><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm"></a></span><a href="ac2k1901.htm"><span class="p1">数据的优化和安全</span><br>
        </a><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1301.htm"></a></span><a href="ac2k2001.htm"><span class="p1">容易忽略的工作</span></a></p>
      <p style="line-height:17pt" align="center" class=p1><a href=/pc/bin/msg.pl?file_id=k_ac2k_10 target="_blank"><br>
        </a>
        <script language="javascript">
speak_num="za"
      </script>
        <script language="javascript" src=/pc/var/pc_k_ac2k_10.js>
      </script>
        <script language="javascript">
var num=0
if (!isNaN(speak_num)){
	num=speak_num;
}
else{
	num=0
}
document.writeln ("已有")
document.writeln (num)
document.writeln ("条发言")
      </script>
      </p>
      </td>
    <td width=1 bgcolor=#0586D7 height="183"><img src="/pc/img/blank.gif" width="1" height="1"> 
    </td>
    <td valign="top" bgcolor="#FFFFFF" background="/pc/img/line.gif" width="614" height="183"> 
      <table width="95%" border="0" align="center">
              
        <tr background="/pc/img/line.gif"> 
          <td colspan="2" class="p3" height="50"> 
            <div align="center"><font color="#003333"><b><font color="#ff3333">为查询添加选择准则</font></b></font></div>
          </td>
        </tr>
        <tr background="/pc/img/line.gif"> 
          <td colspan="2" class="p2"> 
            <p class=p2><span style="line-height:17pt">   这个查询已经建立起来了,但如果只想看看北京地区的客户订单情况,应当该怎么办吗?其实只需要在这个查询中再添加一个字段,然后再为这个字段添加一条准则就可以解决这个问题,这个查询的数据表中就只有北京地区的客户订单情况了。</span></p>
            <p class=p2><span style="line-height:17pt">  添加的字段和准则到底是怎么回事呢?其实在这个查询中添加的字段是“客户信息表”中的“城市”字段,因为这个表和“订单信息表”有关系。所以当我们在查询中添加“城市”字段后,这个字段就会自动将签单公司所在城市的名称信息反映出来。有了这个前提我们只要再添加一个限制条件,也就是让“城市”字段中的值等于“北京”。这时再看查询的数据表视图就会发现,只有满足了这些条件的记录才会显示出来。</span></p>
            <p class=p2><span style="line-height:17pt">  往查询里添加选择准则,有两个问题应该考虑,</span></p>
            <p class=p2><span style="line-height:17pt">   首先是为哪个字段添加“准则”,其次就是要在这个字段添加什么样的“准则”。 
              就拿刚才的这个例子来说吧,很明显就是为“城市”字段添加“准则”,而添加的准则就是限制“城市”字段中的值只能等于“北京”。限定了这两个条件,就可以很容易地实现任何一种选择准则了。</span></p>
            <p class=p2><span style="line-height:17pt">  如何在查询中添加准则呢?我们就将刚才的例子做一遍吧。首先我们要通过“显示表”对话框添加“客户信息表”到查询窗口中,然后选取这个表中的“城市”字段作为查询中的一个字段,由于我们不想让这个字段中的值显示在数据表中,就取消此字段的可见性,将它的“显示”属性定为“否”。添加完这个字段就可以添加条件规则了,现在我们就可以在“城市”字段的“规则”属性中写上“="北京"”,这样就可以了,如下图所示。</span></p>
            <p class=p2 align="center"><img src="img/ac2k1001.gif" width="520" height="282" alt="添加准则" border="1"></p>
            <p class=p2><span style="line-height:17pt">  但有时候,当我们需要对查询记录中的几种信息同时进行限制的时候,就需要将所有这些限制规则一一添加到需要的字段上,这样只有完全满足限制条件的那些记录才能显示出来。现在我就在“订货数量”和“总金额”上都添加一个规则,让“订货数量”大于“200”,“总金额”小于“100000”,这个查询的数据表,只有同时满足这三个条件限制的记录才被选了出来,如下图所示。 
              </span></p>
            <p class=p2 align="center"><img src="img/ac2k1002.gif" width="520" height="131" border="1" alt="添加多个田间限制"></p>
            <p class=p2><span style="line-height:17pt">  除此之外,一个字段还可以有多条限制“规则”。每条“规则”之间可以用逻辑符号来连接。比如要为“总金额”字段添加“<100000”或者“>150000”的规则,只要在“规则”栏内输入“<100000 
              or >150000”就可以了。</span></p>
            <p class=p2 align="center"> </p>
          </td>
        </tr>
      </table>  
      <p align="center"><a href="ac2k0909.htm">上一页</a>&nbsp;&nbsp;&nbsp; <a href="ac2k1002.htm">下一页</a></p>
      <p align="center"> </p>
      <p align="center" class=p2><a href=/pc/bin/msg.pl?file_id=k_ac2k_10 target="_blank"><br>
         </a></p>
      
    </td>
  </tr>
</table>
<script language="Javascript" src="/pub/js/foot.js"></script>
<!--底部结束-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -