matrixindicator
IS-IT--Management
Hello,
I have a query who needs a value of a Form. Its works perfectly when I open the query. He retrieve the parameter from the Form by this reference.
However, when the Function create a recordset based on the query to get the total record, vba said that the query has to few parameters. Do I need to open my Form in the code ?
I have a query who needs a value of a Form. Its works perfectly when I open the query. He retrieve the parameter from the Form by this reference.
Code:
MONTH: [Forms]![F_01]![txtFile]
However, when the Function create a recordset based on the query to get the total record, vba said that the query has to few parameters. Do I need to open my Form in the code ?
Code:
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("001_QS", dbOpenDynaset)
rst.MoveFirst
rst.MoveLast
Count3 = rst.RecordCount
rst.Close