您可以在启动时执行此操作。只需编写一个查询来选择您想要的记录。然后循环查询并向每个人发送一封电子邮件,然后确保您有一个名为“EmailSent”的字段,您将更新为 True,这样您就不会在第二天向他们发送电子邮件(假设您只想给他们发一次电子邮件)。
您可能只需要一些 VBA:
Dim db as Database
Dim rec as Recordset
Set db = CurrentDB
Set rec = db.OpenRecordset("SELECT * FROM MyQueryName")
Do while rec.EOF = False
'Loop through each record, send them an email
'Add code to send email here
rec.MoveNext
'Now update the table so these guys don't get emailed again
dim MySQL as String
MySQL = "UPDATE MyQueryName SET EmailSent = 'True'"
DoCmd.RunSQL MySQL
以上都是“aircode”,未经测试,但应该让你朝着正确的方向前进。
只需确保 EmailSent = False 是您查询中的一个条件。