I'm trying to modify a query (Command Object) in my current project in VBA. I'm using this code:
I keep getting error #3265 "Item cannot be found in the collection corresponding to the requested name or ordinal". The query "qryEvent_Data" is a query found in current project.
I'm pulling out hair on this one. I would be very greatful if anyone can help.
Thanks,
Rewdee
Code:
Dim cat As New ADOX.Catalog
Dim qdfEvtData As ADODB.Command
Dim sSQL As String
cat.ActiveConnection = CurrentProject.Connection
Set qdfEvtData = cat.Procedures("qryEvent_Data").Command
....
I'm pulling out hair on this one. I would be very greatful if anyone can help.
Thanks,
Rewdee