Trying to run this command
Code:
Private Sub Component_ID_Click()
DoCmd.OpenQuery "qry_TEST", acViewNormal, acAdd, "Component_ID = '" & Me.Component_ID & "'"
End Sub
I'm getting an error "wrong number of arguments or invalid property assignment".
It's the same code I'm already using that works just fine as below, so I don't get it but I had the same issue before with "OpenQuery"
Code:
Private Sub Demand_Click()'Opens demand orders on click
DoCmd.OpenReport "rpt_DemandOrdersByItem", acViewReport, , "Component_Id = '" & Me.Component_ID & "'"
End Sub
With the OpenReport, the report calls the data from a query and Component_ID is passed to that query as a criteria filter before opening the report, don't know why it bugs when only calling the query using the same method.