?? ac2k1506.htm
字號:
<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,數據庫">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<!--頂部開始-->
<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="/default.htm" class="under">洪恩在線</a>
-> <a href="/pc/index.htm" class="under">電腦樂園</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">初識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>
<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></span><span class="p1"><br>
<font color="#0000CC"><img src="img/small.gif" width="12" height="12"></font>
<a href="ac2k1301.htm">為WEB頁提供數據</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">用圖表顯示數據</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">宏的使用</span></p>
<p style="line-height:17pt" align="left"><span class="p1"> <a href="ac2k1501.htm">什么是宏</a><br>
<a href="ac2k1502.htm">為什么要用宏</a><br>
<a href="ac2k1503.htm">查看宏設計窗口</a><br>
<a href="ac2k1504.htm">創建宏</a><br>
<a href="ac2k1505.htm">了解宏包含的操作</a><br>
執行宏<br>
<a href="ac2k1507.htm">補充內容一</a><br>
<a href="ac2k1508.htm">補充內容二</a><br>
<a href="ac2k1509.htm">補充內容三</a><br>
<a href="ac2k1510.htm">補充內容四</a></span><br>
<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="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><span class="p1"></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><span class="p1"></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><span class="p1"></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><span class="p1"></span><a href="ac2k2001.htm"><span class="p1">容易忽略的工作</span></a></p>
<p><span class="p1"> </span></p>
<p align="center" class=p1><a href=/pc/bin/msg.pl?file_id=k_ac2k_15 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_15.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> </p>
<p><span class="p1"> </span> </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">執行宏</font></b></font></div>
</td>
</tr>
<tr background="/pc/img/line.gif">
<td class="p2" style="line-height:17pt" height="618">
<p> 在ACCESS中,宏并不能單獨執行,必須有一個觸發器。而這個觸發器通常是由窗體、頁及其上面的控件的各種事件來擔任的。比如在窗體上單擊一個按鈕,這個單擊過程就可以觸發一個宏的操作。
</p>
<p> 現在建立一個窗體。用一個按鈕單擊事件來觸發我們剛才新建的宏“查詢”。首先將表“員工簡歷”上的“姓名”等字段顯示在這個窗體上,然后在這個窗體上再添加一個文本框,用這個文本框來輸入要查詢的員工姓名,注意還要將這個文本框的名字改為“需要查詢的值”,完成之后在窗體上添加一個按鈕,并把它的名字改為“查詢”。添加好以后就可以在這個按鈕的屬性上設置宏“查詢”的觸發事件了。
</p>
<p> 首先我們選中這個按鈕,然后打開這個按鈕的屬性,如下圖所示。</p>
<p align="center"><img src="img/ac2k1504.gif" width="300" height="229" alt="命令按鈕屬性框"></p>
<p> 在屬性選項卡上選擇“事件”選項,然后將鼠標移動到“單擊”選項右邊的方框內,單擊鼠標左鍵,這時在這個方框右側會出現一個“向下”按鈕,單擊這個按鈕,在彈出的下拉選單中單擊“宏1.查詢”項,這樣可以了。以后當這個窗體以數據表視圖出現的時候,單擊這個按鈕就可以執行我們剛才建立的宏了。
</p>
<p> 現在我們將視圖切換到窗體的數據表視圖。我們可以通過單擊記錄選定器上的不同按鈕移動到不同的員工記錄上去,現在我們將我們需要查詢的員工姓名輸入到文本框“需要查詢的值”中去,輸入完以后,單擊“查詢”按鈕,現在員工記錄已經跳到我們剛才所輸入的那個員工位置上去了。
</p>
<p> </p>
</td>
</tr>
</table>
<p align="center"><a href="ac2k1505.htm" class="p1">上一頁</a> <font size="2"><a href="ac2k1507.htm"><font size="2">下一頁</font></a>
</font></p>
<p align="center" class=p2><a href=/pc/bin/msg.pl?file_id=k_ac2k_15 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_15.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 + -