访问Outlook [英] Access to Outlook

查看:61
本文介绍了访问Outlook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为tblError的表。该表包括以下列:(1)员工ID(2)错误代码(3)电子邮件地址(4)电子邮件已发送(复选框来自是或否,是,如果选中。我有第二个表名为tblErrorCodes,表示有两列(1)错误代码(2)错误描述.tblError由追加查询填充,只提取带有错误代码的新记录。我的目标是提取一个显示员工ID的查询,其中包含错误代码和他们的电子邮件地址。然后我希望此查询的结果向每个收件人发送一封电子邮件。标题将始终为错误信息,但由于每个错误代码可能不同,因此电子邮件正文将显示错误这些电子邮件将发送给查询中的每个员工,但是单独发送。我不能只发送1封电子邮件给多个收件人。电子邮件发送完毕后,我需要自动选中发送电子邮件复选框以显示是意味着发送。如果这有任何意义,请帮忙!谢谢。

I have a table named "tblError". The table includes the following columns: (1) Employee ID (2) Error Code (3) Email Address (4) Email Sent (Check box from Yes or No, Yes if checked. I have a second table named "tblErrorCodes" that has two columns (1) Error Code (2) Error description. The tblError is populated by an append query and only pulls new records with error codes. My object is to pull a query that shows Employee ID''s with the error code and their email address. I then want the results of this query to send an email to each of the recipients. The title will always be "Error Discrepency" but because each error code can be different, the body of the email will display the error description. These emails would be sent to each employee in the query but separately. I can not just send 1 email to multiple recipients. After the email has been sent, I need the "Email Sent" check box to be automatically checked to show "Yes" meaning sent. If this makes any sense, PLEASE HELP! Thanks.

推荐答案

您可以使用DAO Recordset。我把它设置为一个名为cmdEmailErrors的命令按钮后面的代码,因为你还没有说明你希望如何触发这个代码。

You can use a DAO Recordset. I''m setting this up as code behind a command button called cmdEmailErrors as you haven''t said how you want this code triggered.

展开 | 选择 | Wrap | 行号


Mary


感谢您的及时回复。还有一个问题,如果你不介意的话。如何放置Error Discrepency和Error Discrepency。在电子邮件主题行?万分感谢。
Mary

Thank you for your prompt reply. One more question if you don''t mind. How do I place "Error Discrepency" in the Email Subject line? Thanks a million.


更改代码如下:

Change the code as follows:

展开 | 选择 | 换行 | 行号


这篇关于访问Outlook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆