Function SQLOutput(strSQL As String, qdfTemp As DAO.QueryDef)
Dim rstAusPostCodesA As DAO.Recordset
qdfTemp.SQL = strSQL
Set rstAusPostCodesA = qdfTemp.OpenRecordset
Me.postcode = rstAusPostCodesA
The debug statements Debug.Print strSQL and Debug.Print qdfTemp.SQL return the query in the manner I would expect. However on the line Set rstAusPostCodesA = qdfTemp.OpenRecordset I get an error message 3061, too few parameters expected two.
I suspected rstAusPostCodesA was causing a problem, however, a debug of this does not throw an error. So, I assume it is something to do with qdfTemp.OpenRecordset, but I can't for the life of me see it.
Checking back against the help example has provided no clues at all.