I am working on a db where I have a query updated with parameters on a form. I need to collect the recordset out of this query to email. My function does pull the data as long as I don't have any parameters set inside of query. Can someone help me with the code to set the parameters in the query? I keep getting Error "Too few parameters. Expected 1."

Here are the codes I am using.

SQL of query:
SELECT tblUserIDs.Name, tblUserIDs.DeptCode, tblUserIDs.UserID
FROM tblUserIDs
WHERE (((tblUserIDs.DeptCode)=[Forms]![frmRequests]![DeptCode]));

Function:
Function GetList() As String
On Error GoTo Err_Handler
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strInfo As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryList", dbOpenForwardOnly, dbReadOnly)
While Not rst.EOF
strInfo = strInfo & rst!userid & vbTab & strInfo & rst!Name & vbCrLf
rst.MoveNext
Wend
GetList = strInfo
Exit_Handler:
If Not rst Is Nothing Then
rst.Close
Set rst = Nothing


End If
If Not dbs Is Nothing Then
Set dbs = Nothing
End If
Exit Function
Err_Handler:
MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler
End Function