Question : No value given for one or more required parameters

It must be something simple ;)

After reviewing several other questions similar to this I have not yet found an answer.

I am attempting to select records from a query and insert them into a record set. I have done it before in this form but for some reason this set of statements are causing the a problem.

Dim rstJRN As ADODB.Recordset
Dim strSQL As String

'define the sql statement to be run
strSQL = "SELECT ProjectNumber, CoName, License, Type, FinalsDate, FinalsTax, " & _
"FinalsInterest, FinalsPenalty, AuditCount FROM [qryReportsEngPrlmFnlStlBrd-1] " & _
"ORDER BY ProjectNumber;"

Set rstJRN = New ADODB.Recordset

'open the record set using the sql statement
rstJRN.Open strSQL, Application.CurrentProject.Connection

The sql statement is fine, I copied it into a query and it works as expected. Can anyone see the problem I am having?
(High points due to urgency)
Thanks, Majik

Answer : No value given for one or more required parameters






Public MyCriteria
Public Function fnMyCriteria()
fnMyCriteria = pubMyCriteria
end function

in your query criteria

fnMyCriteria()


then before your SQL
pubMyCriteria = me!someCriteria

run your sql







Random Solutions  
 
programming4us programming4us