J
Junior
i'm trying to open a report who's datasource is a parameter query based on
value in a
txtbox [txtCertNo]in a subform [sfrmEOD]
The VBA code in the after update event of a cbobox causes - Runtime error
2770 - 'the object you referenced in the vb procedure as an OLE object isn't
an ole object' - a snippet of the code is below with the error line marked
I suspect i have not properly defined the parameter - since the control is
on a subform.
but strangely, opening the report and/or the query [qChkEOD] with the
mainform [frmEOD] & [sfrmEOD] minimized works
but errors when opening the report using the after update event.
So what am i doing wrong?
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("qChkEOD")
' evaluate the query's parameter(s)
For Each prm In qdf.Parameters
prm = Eval(prm.Name) <<<< highlighted debug line 'prm.Name =
[Forms]![sfrmEOD].[txtCertNo]
Next prm
value in a
txtbox [txtCertNo]in a subform [sfrmEOD]
The VBA code in the after update event of a cbobox causes - Runtime error
2770 - 'the object you referenced in the vb procedure as an OLE object isn't
an ole object' - a snippet of the code is below with the error line marked
I suspect i have not properly defined the parameter - since the control is
on a subform.
but strangely, opening the report and/or the query [qChkEOD] with the
mainform [frmEOD] & [sfrmEOD] minimized works
but errors when opening the report using the after update event.
So what am i doing wrong?
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("qChkEOD")
' evaluate the query's parameter(s)
For Each prm In qdf.Parameters
prm = Eval(prm.Name) <<<< highlighted debug line 'prm.Name =
[Forms]![sfrmEOD].[txtCertNo]
Next prm