<?xml version="1.0" encoding="UTF-8"  standalone="yes" ?>
<rss version="2.0">
	<channel>
		<title>社群: 艾鍗學院 Blog - 文件區(Access VBA)</title>
		<description>台灣數位學習數位教學平台 RSS feed provider</description>
		<language>zh-tw</language>
		<link>http://lms.xms.com.tw/board.php?courseID=143&amp;f=doclist&amp;folderID=1743</link>
	<item>
		<title>[Access VBA] 表單傳遞資料</title>
		<link>http://lms.xms.com.tw/board.php?courseID=143&amp;f=doc&amp;cid=9544</link>
		<description>Access VBA表單傳遞資料的方式&amp;nbsp;Method 1: 從表單找到控制項,取值&amp;nbsp; Forms(&quot;資料表單&quot;).Controls(&quot;StudentNo&quot;).Value&amp;nbsp;&amp;nbsp;Method 2: 使用Form.OpenArg&amp;nbsp; 開智表單並傳傳參數&amp;nbsp; DoCmd.OpenForm stDocName, , , stLinkCriteria, , ,&amp;nbsp;StudentNo&amp;nbsp; 被開智的表單,利用Form.OpenArgs 取得傳入的參數&amp;nbsp;&amp;nbsp;&amp;nbsp;lbl_studentNo.Caption = Me.OpenArgs &amp;nbsp; &amp;nbsp;&#039; set studentNo to correct data       </description>
		<pubDate>Thu, 03 Jan 2013 09:30:36 +0800</pubDate>
	</item>
	<item>
		<title>[Access VBA] tab Control</title>
		<link>http://lms.xms.com.tw/board.php?courseID=143&amp;f=doc&amp;cid=9534</link>
		<description>As gemma has suggested, the OnClick event for a tabbed control is nearly useless! You have to use the OnChange event. Here&#039;s a short tutorial:The first thing to understand is that tabbed pages are indexed starting with zero, i.e. the first page has a value of 0, second page has a value of 1, third page has a value of 2, etc.Secondly, you need to understand that the OnClick event of a tabbed page only fires when you click on the page itself, not the tab at the top of the page!Lastly, you need to understand that the tabbed control change event fires anytime the tabbed pages change. But to base something on the change event, you have to identify the particular page that has focus.Code:Private Sub YourTabbedControl_Change()
If Me.YourTabbedControl.Value = 0 Then &#039;First Page
  &#039;Do code for Page 1
ElseIf Me.YourTabbedControl.Value = 1 Then &#039;Second page
  &#039;Do code for Page 2
ElseIf Me.YourTabbedControl.Value = 2 Then &#039;Third page
  &#039;Do code for Page 3
End If
End Sub   </description>
		<pubDate>Sat, 29 Dec 2012 18:47:46 +0800</pubDate>
	</item>
	<item>
		<title>[Access VBA] Send Email from Access VBA</title>
		<link>http://lms.xms.com.tw/board.php?courseID=143&amp;f=doc&amp;cid=9475</link>
		<description>Private Sub Command0_Click()Dim olApp As ObjectDim objMail As ObjectOn Error Resume Next &#039;Keep going if there is an errorSet olApp = GetObject(, &quot;Outlook.Application&quot;) &#039;See if Outlook is openIf Err Then &#039;Outlook is not openSet olApp = CreateObject(&quot;Outlook.Application&quot;) &#039;Create a new instance of OutlookEnd If&#039;Create e-mail itemSet objMail = olApp.CreateItem(olMailItem)With objMail&#039;Set body format to HTML.BodyFormat = olFormatHTML.To = &quot;your email; your second email&quot;.Subject = &quot;Subject&quot;.HTMLBody = &quot;&amp;lt;HTML&amp;gt;&amp;lt;H2&amp;gt;The body of this message will appear in HTML.&amp;lt;/H2&amp;gt;&amp;lt;BODY&amp;gt;Type the message text here. &amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&quot;&#039;.Send &amp;nbsp; &amp;nbsp; &#039; 直接寄出.Display &amp;nbsp;&#039; 顯示outlookEnd With參考資料:&amp;nbsp;http://msdn.microsoft.com/en-us/library/office/ff861332.aspx       </description>
		<pubDate>Tue, 11 Dec 2012 20:01:26 +0800</pubDate>
	</item>
	<item>
		<title>[Access VBA] 如何得知表單資料內容已更新?</title>
		<link>http://lms.xms.com.tw/board.php?courseID=143&amp;f=doc&amp;cid=9474</link>
		<description>&amp;nbsp;Private Sub Form_BeforeUpdate(Cancel As Integer)&amp;nbsp;Call Check_Dirty(Me)End SubPublic Sub Check_Dirty(myform As Form)&amp;nbsp; &amp;nbsp; &amp;nbsp; If myform.Dirty Then&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If MsgBox(&quot;本筆資料已修改!要儲存嗎?&quot;, vbYesNo, &quot;確認儲存&quot;) = vbNo Then&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myform.Undo&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;End IfEnd Sub&amp;nbsp; &amp;nbsp;&amp;nbsp;為什麼是在BeforeUpdate 事件裡檢查?&amp;nbsp;&amp;nbsp; &amp;nbsp;因為.Form.dirty 指的是資料改變到尚未儲存該筆資料的這段期間,&amp;nbsp;&amp;nbsp; 所以在&quot;更新前&quot;先提示使用者, 若是在AfterUpdate 事件,那時候表示資料已儲存了.&amp;nbsp;&amp;nbsp; 故Form.dirty 會是false 的狀態,不是true&amp;nbsp;&amp;nbsp;###When do we use each of them, and what does it mean.Rather, how do i know what to use when....dbOpenDynasetdbOpenDynamicdbOpenForwardOnlydbOpenSnapshotdbOpenTabledbOpenOptimistic   </description>
		<pubDate>Tue, 11 Dec 2012 19:58:59 +0800</pubDate>
	</item>
	<item>
		<title>[Access VBA] 如何滙出資料到Excel</title>
		<link>http://lms.xms.com.tw/board.php?courseID=143&amp;f=doc&amp;cid=8949</link>
		<description>Q1:&amp;nbsp;&amp;nbsp;in &amp;nbsp;VBA code ,&amp;nbsp;&amp;nbsp; Dim appExcel As Excel.Application&amp;nbsp;why ??&amp;nbsp;在執行的時候會出現 &quot;使用者自訂型態尚未定義&quot;Answer:&amp;nbsp;&amp;nbsp; &amp;nbsp; 在工具-&amp;gt;設定引用項目 &amp;nbsp;,選擇 Microsoft Excel 12.0 Object Library                 </description>
		<pubDate>Tue, 21 Aug 2012 18:13:02 +0800</pubDate>
	</item>
	</channel>
	</rss>
