?? ac2k1604.htm
?? 一部Access2000的基礎(chǔ)教程
?? HTM
字號(hào):
??
<html>
<head>
<title>洪恩在線 - Access 2000</title>
<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,數(shù)據(jù)庫(kù)">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<!--頂部開(kāi)始-->
<script language="Javascript" src="/pub/js/head.js"></script>
<!--頂部結(jié)束-->
<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">當(dāng)前位置</font>:<a href="/default.htm" class="under">洪恩在線</a>
-> <a href="/pc/index.htm" class="under">電腦樂(lè)園</a> -> 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"> </td>
</tr>
</table>
<p style="line-height:17pt" align="left"><span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12">
<a href="ac2k0101.htm">初識(shí)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">窗口接口使用簡(jiǎn)介<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">用向?qū)Ы?shù)據(jù)庫(kù)</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">數(shù)據(jù)庫(kù)的結(jié)構(gòu)</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">用表向?qū)Ы⒈?lt;/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">在表中輸入數(shù)據(jù)</a> <a href="ac2k0601.htm"><br>
</a><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k0701.htm">數(shù)據(jù)的類型和屬性</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">定義表之間的關(guān)系</a></span><span class="p1"><br>
<font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k0901.htm">建立簡(jiǎn)單的查詢</a></span><span class="p1"> <br>
<font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1001.htm">為查詢制定規(guī)則</a><br>
<font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1101.htm">如何建立數(shù)據(jù)窗體<br>
</a><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1201.htm">生成數(shù)據(jù)打印報(bào)表</a></span><span class="p1"><br>
<font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1301.htm">為WEB頁(yè)提供數(shù)據(jù)</a></span><span class="p1"> <br>
<font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1301.htm"></a></span><span class="p1"></span><span class="p1"><a href="ac2k1401.htm">用圖表顯示數(shù)據(jù)</a></span>
<br>
<span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1301.htm"></a></span><span class="p1"></span><span class="p1"><a href="ac2k1501.htm">宏的使用</a></span>
<br>
<span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1301.htm"></a></span><span class="p1"></span><span class="p1">模塊與“VBA”語(yǔ)言</span></p>
<p style="line-height:17pt" align="left"><span class="p1"> <a href="ac2k1601.htm">什么是VBA和模塊</a><br>
<a href="ac2k1602.htm">VBA開(kāi)發(fā)環(huán)境</a><br>
<a href="ac2k1603.htm">變量和常量</a><br>
函數(shù)和子程序 <br>
</span><br>
<span class="p1"><font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1301.htm"></a></span><span class="p1"></span><a href="ac2k1701.htm"><span class="p1">SQL語(yǔ)言妙用</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><span class="p1"></span><a href="ac2k1801.htm"><span class="p1">外部數(shù)據(jù)的使用</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><span class="p1"></span><a href="ac2k1901.htm"><span class="p1">數(shù)據(jù)的優(yōu)化和安全</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><span class="p1"></span><a href="ac2k2001.htm"><span class="p1">容易忽略的工作</span></a></p>
<p align="center" class=p1><a href=/pc/bin/msg.pl?file_id=k_ac2k_16 target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="請(qǐng)您留言" border="0"><br>
談?wù)勀目捶?lt;/a> <br>
<script language="javascript">
speak_num="za"
</script>
<script language="javascript" src=/pc/var/pc_k_ac2k_16.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 ("條發(fā)言")
</script>
</p>
<p> </p>
<p> </p>
<p> </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">
函數(shù)和子程序</font></b></font></div>
</td>
</tr>
<tr background="/pc/img/line.gif">
<td class="p2" style="line-height:17pt">
<p> 講了變量,現(xiàn)在也要講講“函數(shù)”和“子程序”了。 </p>
<p> 像“sin( )”、“abs( )”這些都是函數(shù)都是內(nèi)部函數(shù),現(xiàn)在我們要來(lái)講講外部函數(shù),外部函數(shù)和變量一樣在使用之前也是要先申明。它們的結(jié)構(gòu)如下圖所示。</p>
<p align="center"><img src="img/ac2k1606.gif" width="420" height="104" alt="函數(shù)結(jié)果">
</p>
<p align="center"><img src="img/ac2k1608.gif" width="400" height="188" alt="舉例" border="1"></p>
<p align="left"> <br>
函數(shù)則會(huì)把“a+b-c”的值返回給函數(shù)名“Getnumber”,如果我們輸入Getnumber(9,4,2),則會(huì)返回“9+4-2”即“11”給函數(shù)“Getnumber”。“Function”的英文含意就是“函數(shù)”。它在這兒用來(lái)作為函數(shù)申明的一個(gè)內(nèi)容。在它后面跟著的就是這個(gè)函數(shù)的函數(shù)名。在這個(gè)函數(shù)名后面的括號(hào)中,列的是這個(gè)函數(shù)中的參數(shù)。每個(gè)函數(shù)之間要用逗號(hào)隔開(kāi),并用“As”語(yǔ)句后跟“數(shù)據(jù)類型”來(lái)定義數(shù)據(jù)的類型。
括號(hào)外面的“As 數(shù)據(jù)類型”用來(lái)定義“函數(shù)名”的。它表示函數(shù)返回的數(shù)據(jù)的數(shù)據(jù)類型。 </p>
<p> 其實(shí)子程序和函數(shù)很相似,兩者結(jié)果對(duì)比如下圖所示。</p>
<p align="center"><img src="img/ac2k1607.gif" width="380" height="238" alt="兩者結(jié)果對(duì)比" border="1"></p>
<p> <br>
這兩種類型的過(guò)程都可以接收參數(shù),函數(shù)可以返回單一的數(shù)據(jù)值,但子程序不能。另外,你可以從ACCESS中任何地方執(zhí)行一個(gè)函數(shù),包括從查詢中的表達(dá)式中和宏中。然而你只能從一個(gè)函數(shù)、子程序或作為一個(gè)窗體或報(bào)表中的一個(gè)事件過(guò)程來(lái)執(zhí)行子程序。
</p>
<p> </p>
</td>
</tr>
</table>
<p align="center"><a href="ac2k1603.htm" class="p1">上一頁(yè)</a> <a href="ac2k1605.htm" class="p1">下一頁(yè)</a><font size="2"> </font></p>
<p align="center" class=p2><a href=/pc/bin/msg.pl?file_id=k_ac2k_16 target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="請(qǐng)您留言" border="0"><br>
談?wù)勀目捶?lt;/a>
<script language="javascript">
speak_num="za"
</script>
<script language="javascript" src=/pc/var/pc_k_ac2k_16.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 ("條發(fā)言")
</script>
</p>
</td>
</tr>
</table>
<!--底部開(kāi)始-->
<script language="Javascript" src="/pub/js/foot.js"></script>
<!--底部結(jié)束-->
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -