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

📄 ac2k0804.htm

📁 我是在使用VC查询数据库时
💻 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,数据库,关系,子数据表">
</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"><img src="/pc/img/blank.gif" width="12" height="8"><font color="#000000"><font color="#FF9966">当前位置</font>:<a href="http://www.book52.com/">LR电脑书籍网 </a> → <a href="http://www.book52.com/soft/">电脑书下载 </a> → <a href="http://www.book52.com/soft/sort06/list6_1.html">数据库类 </a> → <a href="http://www.book52.com/soft/sort06/sort049/list49_1.html">Access书籍 </a>  <font color="#330099">→</font> 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"><img src="/pc/img/title_00.gif" width="13" height="20"></td>
          <td height="20" bgcolor="#E8E8E8" width="23">&nbsp;</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></span></font><font color="#0000CC"><span class="p1"> 
        <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></font><font color="#0000CC"><span class="p1"><span class="p1"> 
        </span><br>
        </span></font><span class="p1"><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"><font color="#0000CC"><span class="p1"> <span class="p1"> <a href="ac2k0801.htm">“关系” 
        简介</a><br>
          <a href="ac2k0802.htm">表之间的三种关系</a><br>
          <a href="ac2k0803.htm">怎样在表之间建立关系</a><br>
          “关系”与“子表”<br>
          <a href="ac2k0805.htm">补充内容</a></span></span></font><br>
        <br>
        <font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k0901.htm">建立简单的查询</a><br>
        <font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font> 
        <a href="ac2k1001.htm">为查询制定规则</a><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="left">&nbsp;</p>
      <p style="line-height:17pt" align="center" class=p1><a href=/pc/bin/msg.pl?file_id=k_ac2k_8 target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="请您留言" border="0"><br>
        谈谈您的看法</a> <br>
        <script language="javascript">
speak_num="za"
</script>
        <script language="javascript" src=/pc/var/pc_k_ac2k_8.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>
      <p style="line-height:17pt" align="left"><span class="p1"><span class="p1"> 
        </span></span> </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 align="center"><img src="img/ac2k0809.gif" width="414" height="131" alt="“客户信息表”及其子表"></p>
            <p class=p2><span style="line-height:17pt">  在这种“一对多”的情况下,完全可以通过“客户信息表”中的“公司名称”信息将这两个表的内容都串起来。在主表中的每一个记录下面都会带着一个甚至几个子表中的“订单”记录。具有“一对一”关系的两个表之间互为对方的“子表”。</span></p>
            <p class=p2><span style="line-height:17pt">   通常在建立表之间的关系以后,Access会自动在主表中插入子表。但这些子表一开始都是不显示出来的。在Access中,让子表显示出来叫做“展开”子数据表,让子表隐藏叫做将子数据表“折叠”。展开的时候方便查阅订单信息,而折叠起来以后有可以比较方便的管理“客户信息表”。</span></p>
            <p class=p2><span style="line-height:17pt">  要“展开”子数据表,只要用鼠标单击主表第一个字段前面一格,对应记录的子记录就“展开”了,并且格中的小方框内“加号”变成了“减号”。如果再单击一次,就可以把这一格的子记录“折叠”起来了,小方框内的“减号”也变回“加号”。如果主表很大的话,这样一个一个地“展开”和“折叠”子数据表就显得太麻烦了,Access为我们提供了一种操作方式,它可以一下子“展开”或“折叠”当前数据表的所有子数据表。打开一个带有子数据表的表时,在“格式”菜单“子数据表”项的子菜单中,有三个命令“全部展开”、“全部折叠”和“删除”,“全部展开”命令可以将主表中的所有子数据表都“展开”,“全部折叠”命令可以将主表中的所有子数据表都“折叠”起来。不需要在主表中显示子数据表的这种方式来反映两个表之间的“关系”时,就可以使用“删除”命令来把这种用子数据表显示的方法删除。但这时两个表的“关系”并没有被删除。如果想恢复在主表上显示“子数据表”的形式,可以先打开主表,比如“客户信息表”,单击“插入”菜单下的“子数据表”命令,弹出“插入子数据表”对话框如下图:</span></p>
            <p align="center"><img src="img/ac2k0808.gif" width="353" height="301" alt="“插入子数据表”对话框"></p>
            <p class=p2><span style="line-height:17pt">  在列表框中选取“表”----“订单信息表”,然后在“链接子字段”组合框中选取“订货单位”字段,并在“链接主字段”组合框中选取“公司名称”字段,单击“确定”按钮就可以在主数据表“客户信息表”中重新插入子数据表“订单信息表”了。必须要注意的是在任何一个数据表中插入子数据表都需要在两个表之间建立“关系”,如果这两个表的“主链接字段”和“子链接字段”之间还没有建立联结的话,在单击“确定”按钮插入“子数据表”的时候就会询问是否要在这两个表之间建立相应的“关系”,只有建立“关系”以后,才能完成“插入子数据表”过程。用这样的方式在表之间建立“关系”不像在“关系”对话框中建立的“关系”那样直观。所以我们提倡在关系对话框中建立好表与表之间的“关系”,由Access自动地创建子数据表。</span></p>
            <p class=p2><span style="line-height:17pt">   结束语:这一课通过“客户信息表”和“订单信息表”将表与表之间的“关系”展现在我们面前,如果你已经掌握了表的操作,那就开始看下一课;如果你还没有完全掌握“表”,就将这四课再好好看一看,因为表是数据库中最重要的一个部分了。</span></p>
            </td>
        </tr>
      </table>  
      <p align="center"><font size="2"><a href="ac2k0803.htm">上一页</a>   <a href="ac2k0805.htm">下一页</a></font></p>
      <p align="center" class=p2><a href=/pc/bin/msg.pl?file_id=k_ac2k_8 target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="请您留言" border="0"><br>
        谈谈您的看法</a> 
        <script language="javascript">
speak_num="za"
</script>
        <script language="javascript" src=/pc/var/pc_k_ac2k_8.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>
  </tr>
</table>
<!--底部开始-->
<script language="Javascript" src="/pub/js/foot.js"></script>
<!--底部结束-->
</body>
</html> 

⌨️ 快捷键说明

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