A
Alan T
I got this runtime error:
Item not found in this collection.
These are my code:
Private Function InitialiseNewInvoiceItems(InvoiceID As Long)
Dim invDB As Database
Dim qryInitialiseInvoiceItems As QueryDef
........
.......
Set invDB = DBEngine.Workspaces(0).Databases(0)
Set qryInitialiseInvoiceItems =
invDB.QueryDefs("qryInitialiseNewInvoiceItems") <----- error's here
....
....
End Function
I checked I have created a query has the same name
"qryInitialiseNewInvoiceItems".
Why it can't find it?
Item not found in this collection.
These are my code:
Private Function InitialiseNewInvoiceItems(InvoiceID As Long)
Dim invDB As Database
Dim qryInitialiseInvoiceItems As QueryDef
........
.......
Set invDB = DBEngine.Workspaces(0).Databases(0)
Set qryInitialiseInvoiceItems =
invDB.QueryDefs("qryInitialiseNewInvoiceItems") <----- error's here
....
....
End Function
I checked I have created a query has the same name
"qryInitialiseNewInvoiceItems".
Why it can't find it?