I keep getting an error that says "Too few parameters. Expected 1." on the line I colored RED
Any ideas where I went wrong. I did reference the Microsoft Outlook 11.0 Library
VB Code:
Private Sub cmdFORM25_Click()
Dim sSQL As String
Dim stNum As String
stNum = "25"
sSQL = "SELECT * FROM SATETRAINING WHERE Comments = stNum"
[COLOR=Red]Set rs = CurrentDb.OpenRecordset(sSQL)[/COLOR]
Do While Not rs.EOF
Dim stName As String
Dim stSubject As String
Dim stText As String
Dim stEmail As String
stName = rs!FullName
stSubject = "Form 25 needed for" & stName
stText = "You do not have a Form 25 on File." & Chr$(13) & _
"Please drop off a copy at the Finance Customer Service Desk." & Chr$(13) & _
"If you do not turn in your Form 25 Comm may take away your network privileges."
DoCmd.SendObject , , acFormatTXT, stEmail, , stSubject, stText, -1
rs.MoveNext
Loop
End Sub