Hi everyone,
My company has decided to stick with MS Access as the Front-End UI for our basic needs with the backend being held on a local SQL Server.
I am in the process of writing pass-through queries that I will then build forms and reports from within the UI and am having some trouble getting the query just right on some of these. Since Access doesn't highlight or point out where your invalid syntax is, I have been using NaviCat to help get me through writing these (as I am no expert with T_SQL).
With this particular query, I have gotten it to run in NaviCat just fine, however when copying the query and attempting it as a pass-through query in MS Access to build the frontend I am given an error of:
----------------------------------------------------------------------------------------
ODBC --call failed.
Invalid object name 'T_ReportCodes'. (#208)
----------------------------------------------------------------------------------------
What is going on here? I was hoping that I could take the majority of my existing queries that we have developed in Access and copy their code into the new frontends and run them as pass-through queries with no problem.
Any suggestions? Here is the query in question below:
SELECT IVM_ITEMMAST.ITEM_NUMBER AS [PartNo], T_ReportCodes.Description, T_AdditionalInfo.Phase, T_AdditionalInfo.Volt, T_AdditionalInfo.Depth, T_AdditionalInfo.ShipLength, T_AdditionalInfo.ShipWidth, T_AdditionalInfo.ShipHeight, ([T_AdditionalInfo].[ShipHeight]*[T_AdditionalInfo].[ShipWidth]*[T_AdditionalInfo].[ShipLength])/1728 AS ShipCuFt, T_AdditionalInfo.ShipWeight
FROM T_ReportCodes INNER JOIN (IVM_ITEMMAST INNER JOIN T_AdditionalInfo ON IVM_ITEMMAST.ITEM_NUMBER = T_AdditionalInfo.ItemNo) ON T_ReportCodes.ReportCode = IVM_ITEMMAST.MNTH_SLS_RPT_CD
WHERE (((T_AdditionalInfo.Volt)=115 Or (T_AdditionalInfo.Volt)=208 Or (T_AdditionalInfo.Volt)=240) AND ((T_AdditionalInfo.Active)='Yes'))
ORDER BY T_ReportCodes.ReportCode, IVM_ITEMMAST.ITEM_NUMBER;
Thanks for any advice/help!
My company has decided to stick with MS Access as the Front-End UI for our basic needs with the backend being held on a local SQL Server.
I am in the process of writing pass-through queries that I will then build forms and reports from within the UI and am having some trouble getting the query just right on some of these. Since Access doesn't highlight or point out where your invalid syntax is, I have been using NaviCat to help get me through writing these (as I am no expert with T_SQL).
With this particular query, I have gotten it to run in NaviCat just fine, however when copying the query and attempting it as a pass-through query in MS Access to build the frontend I am given an error of:
----------------------------------------------------------------------------------------
ODBC --call failed.
Invalid object name 'T_ReportCodes'. (#208)
----------------------------------------------------------------------------------------
What is going on here? I was hoping that I could take the majority of my existing queries that we have developed in Access and copy their code into the new frontends and run them as pass-through queries with no problem.
Any suggestions? Here is the query in question below:
SELECT IVM_ITEMMAST.ITEM_NUMBER AS [PartNo], T_ReportCodes.Description, T_AdditionalInfo.Phase, T_AdditionalInfo.Volt, T_AdditionalInfo.Depth, T_AdditionalInfo.ShipLength, T_AdditionalInfo.ShipWidth, T_AdditionalInfo.ShipHeight, ([T_AdditionalInfo].[ShipHeight]*[T_AdditionalInfo].[ShipWidth]*[T_AdditionalInfo].[ShipLength])/1728 AS ShipCuFt, T_AdditionalInfo.ShipWeight
FROM T_ReportCodes INNER JOIN (IVM_ITEMMAST INNER JOIN T_AdditionalInfo ON IVM_ITEMMAST.ITEM_NUMBER = T_AdditionalInfo.ItemNo) ON T_ReportCodes.ReportCode = IVM_ITEMMAST.MNTH_SLS_RPT_CD
WHERE (((T_AdditionalInfo.Volt)=115 Or (T_AdditionalInfo.Volt)=208 Or (T_AdditionalInfo.Volt)=240) AND ((T_AdditionalInfo.Active)='Yes'))
ORDER BY T_ReportCodes.ReportCode, IVM_ITEMMAST.ITEM_NUMBER;
Thanks for any advice/help!