Thanks snoopy75 and WP,
thank you for your reply, however I am still have some questions : is it just as simple as add word ADO in dim db as database. I have tried it but still cannot. I have tried the thread from Kathryn (of this forum) thanks Kathryn, as below :
Private Sub Command6_Click()
Dim dbs As Database
Dim strSQL As String
Dim qdf As QueryDef
Dim rst As Recordset
Dim qdfTemp As QueryDef
Set dbs = CurrentDb
strSQL = "SELECT TblJunction.ConID, TblCon.ConName, TblJunction.ProID, TblPro.ProName, TblCon.ConEmail FROM TblPro INNER JOIN (TblCon INNER JOIN TblJunction ON TblCon.ConID = TblJunction.ConID) ON TblPro.ProID = TblJunction.ProID WHERE (((TblJunction.ProID) = [ID]))ORDER BY TblJunction.ProID;"
Set qdf = dbs.CreateQueryDef("", strSQL)
qdf.Parameters!ID = Me!ProID 'fills the parameter
Set rst = qdf.OpenRecordset
rst.MoveFirst
Do Until rst.EOF
DoCmd.SendObject acSendReport, "Report1", acFormatRTF, _
rst!conemail, "", , _
"Project Status Report", , True, False
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
qdf.Close
Set qdf = Nothing
End Sub
the thread is about to send an email, I have tried to add word "ADO" but still cannot. Would you please help me ?
For WP, where is the interesting article ?
thankyou,