我在MS ACCESS中有一個數據庫,其中有一個ECount字段,其中包含一些計數 有沒有什麼辦法可以在VBA代碼中調用這個調用在那裏我正在生成一個新郵件,它應該在郵件中提取計數。如何從同一個數據庫中的VBA代碼中的MS ACCESS中提取字段
Private Sub Command_Click()
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Dim ThisDay As Date
ThisDay = Format(Now, "mm/dd/yy")
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = ""
.CC = ""
.Subject = "Daily Email Processed " *(Thisday)
.Body = "Hi," + vbNewLine + vbNewLine + vbNewLine + "Please find below the number of Emails processed for the " + vbNewLine + vbNewLine + "Email Count = " (**ECOUNT**) + vbNewLine + "O Count = " (**OCount**)
.Attachments.Add ""
.Attachments.Add ""
.Display
'.ReadReceiptRequested
End With
哪裏ECount場?在表/查詢中? – 2013-02-12 08:42:08
對不起,它在查詢... – CrashOverride 2013-02-12 08:44:45