I have a problem with my VBA code and really hope someone can help me out here 
In Access i have made a report with a button that has to open a e-mail message but when i press the button i got the following error:
run-time error 3061:
Too few parameters. Expected 2.
And when i check out my VBA code i see that the following line is highlighted in yellow.
Set rst = qry.OpenRecordset
I know the problem does lay with the query this code is linked with because it has a parameter.. because when i link it with a query without a parameter it just works.
Does someone know how i can solve this problem the best?

In Access i have made a report with a button that has to open a e-mail message but when i press the button i got the following error:
run-time error 3061:
Too few parameters. Expected 2.
And when i check out my VBA code i see that the following line is highlighted in yellow.
Set rst = qry.OpenRecordset
I know the problem does lay with the query this code is linked with because it has a parameter.. because when i link it with a query without a parameter it just works.
Does someone know how i can solve this problem the best?

Code:
Private Sub Command18_Click()
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Dim qry As QueryDef
Dim rst As Recordset
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("name@email.com")
objOutlookRecip.Type = olTo
' Add the CC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Michael Suma")
objOutlookRecip.Type = olCC
' Add the BCC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Andrew Fulr")
objOutlookRecip.Type = olBCC
' Set the Subject, Body, and Importance of the message.
.Subject = "Training dates"
.BodyFormat = olFormatHTML
.HTMLBody = "<p><strong>Dear Colleague,</strong></p>welcome to our Training offering for Region Europe. We, the Training Team are very excited about the upcoming year - we will have new products blabla, updated training curricula as well as a much better training infrastructure.<p>Please see the attachment for the dates! <p><p><p><p><b>With Kind regards,</strong></b> <p> Name <br> <p><b> Below you can see the upcoming training schedule: </b><br> "
Set qry = CurrentDb.QueryDefs("TrainingCalender Query")
[B]Set rst = qry.OpenRecordset[/B]
Do Until rst.EOF
.HTMLBody = .HTMLBody & " <TABLE BORDER=4 RULES=NONE FRAME=BOX> " & " " & " <br> <p> " & " Training: " & rst![Title] & " " & " <br> " & " Start Time: " & rst![Start Time] & " " & " <br> " & " Place: " & rst![Location] & " </table> "
rst.MoveNext
Loop
.Importance = olImportanceHigh 'High importance
' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add("L:\Public\Access\PDF\Trainingen.pdf")
End If
' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
' Should we display the message before sending?
If DisplayMsg Then
.Display
Else
.Save
.Display
End If
End With
Set objOutlook = Nothing
End Sub