H
Hugh self taught
I have the following query which works perfectly
SELECT T.EvtInput_Idx, T.EvtNumber, T.EvtStructID
FROM tblEvtInput AS T
WHERE (((T.EvtInput_Idx) In (SELECT TOP 1 [EvtInput_Idx] FROM tblEvtInput
WHERE EvtNumber=T.EvtNumber AND Forms!frmEvtInput!EvtNumber = T.EvtNumber
ORDER BY [EvtInput_Idx] DESC)))
When I call it from an "On Change" event
DoCmd.OpenQuery qryMaxOfEvtInputNumber
Forms!frmEvtInput!EvtStructID = T.EvtStructID
I get runtime error 2496
"The action or method requires a Query Name argument"
Anyone got any ideas why?
SELECT T.EvtInput_Idx, T.EvtNumber, T.EvtStructID
FROM tblEvtInput AS T
WHERE (((T.EvtInput_Idx) In (SELECT TOP 1 [EvtInput_Idx] FROM tblEvtInput
WHERE EvtNumber=T.EvtNumber AND Forms!frmEvtInput!EvtNumber = T.EvtNumber
ORDER BY [EvtInput_Idx] DESC)))
When I call it from an "On Change" event
DoCmd.OpenQuery qryMaxOfEvtInputNumber
Forms!frmEvtInput!EvtStructID = T.EvtStructID
I get runtime error 2496
"The action or method requires a Query Name argument"
Anyone got any ideas why?