为什么这不起作用!?!显然我的数据库找不到您的表达式中提到的字段“”。?签名,相当沮丧-ps。
Private Sub Command17_Click()
On Error GoTo Err_Command17_Click
Dim rst As DAO.Recordset
Dim strEmailAddress
Set rst = CurrentDb.OpenRecordset([CourseRosterMaterialsEmail_Query])
Do Until rst.EOF
strEmailAddress = strEmailAddress & rst([CourseRosterMaterialsEmail_Query].[Email]) & ";"
rst.MoveNext
Loop
strEmailAddress = Left(strEmailAddress, Len(strEmailAddress) - 1)
DoCmd.SendObject , , acFormatRTF, strEmailAddress, _
, , [CourseTitle], [Forms]![CourseRosterMaterials_Form]![Details], False, False
rst.Close
Set rst = Nothing
Exit_Command17_Click:
Exit Sub
Err_Command17_Click:
MsgBox Err.Description
Resume Exit_Command17_Click
End Sub