I'm currently developing a web app. that will pull data from an MS Access database. The original queries were developed in Access, and one query is based on another. I'm trying to replicate this with VB.net. Here are the SQL statements:
qryMonthbyLoad = SELECT tblMain.Date, tblSub.LoadCount, tblSub.AvgCYLoad, [LoadCount]*[AvgCYLoad] AS Total
FROM tblMain INNER JOIN tblSub ON tblMain.ID = tblSub.ID
WHERE (((tblMain.Date) Between [1st Day] And [2nd Day]) AND ((tblSub.LoadCount)>0));
query2 = SELECT Sum(qryMonthByLoad.Total) AS SumOfTotal
I'm not quite sure the best way to approach this with VB.net, as it doesn't seem to like selecting from a query.
Any advice would be great!