W
Walter
I get a "You tried to execute a query that does not include the specified
function" error.
I am working on a database to determine when I need to order fuel. The M1P1
is Month 1 Period 1 (the months are divided into 3 periods of 10 days eachs).
M1P1 is the amount of fuel the location will have on hand at that time. I
did this out for 4 months. The MaxAuthLvl is the Maximum Authorized fuel
level for the location. The ERQ is the Economic Resupply Quantity. My idea
was to take the fuel on hand (M1P1) and minus is from the (MaxAuthLvl) and if
it amount was less then the (ERQ) it would state (No) or (Yes) in my
ReorderM1P1 field. I copied the formula from a Microsoft Access 2003 Forms,
Reports, and Queries book. PS. I'm only half way done with the book.
ReorderM1P1: IIf([M1P1]-Sum([MaxAuthLvl])<=[ERQ],"Yes","No")
Below is the SQL.
SELECT tblDODAAC.DODAAC, tblDODAAC.LOCATION, tblProduct.Product,
tblImpData.MaxAuthLvl, tblImpData.ERQ,
IIf([M1P1]-Sum([MaxAuthLvl])<=[ERQ],"Yes","No") AS ReorderM1P1
FROM (tblDODAAC INNER JOIN (tblProduct INNER JOIN tbl16WeekQry ON
tblProduct.Product = tbl16WeekQry.Product) ON tblDODAAC.DODAAC =
tbl16WeekQry.DODAAC) INNER JOIN tblImpData ON (tblProduct.Product =
tblImpData.Product) AND (tblDODAAC.DODAAC = tblImpData.DODAAC)
GROUP BY tblDODAAC.DODAAC, tblDODAAC.LOCATION, tblProduct.Product,
tblImpData.MaxAuthLvl, tblImpData.ERQ;
function" error.
I am working on a database to determine when I need to order fuel. The M1P1
is Month 1 Period 1 (the months are divided into 3 periods of 10 days eachs).
M1P1 is the amount of fuel the location will have on hand at that time. I
did this out for 4 months. The MaxAuthLvl is the Maximum Authorized fuel
level for the location. The ERQ is the Economic Resupply Quantity. My idea
was to take the fuel on hand (M1P1) and minus is from the (MaxAuthLvl) and if
it amount was less then the (ERQ) it would state (No) or (Yes) in my
ReorderM1P1 field. I copied the formula from a Microsoft Access 2003 Forms,
Reports, and Queries book. PS. I'm only half way done with the book.
ReorderM1P1: IIf([M1P1]-Sum([MaxAuthLvl])<=[ERQ],"Yes","No")
Below is the SQL.
SELECT tblDODAAC.DODAAC, tblDODAAC.LOCATION, tblProduct.Product,
tblImpData.MaxAuthLvl, tblImpData.ERQ,
IIf([M1P1]-Sum([MaxAuthLvl])<=[ERQ],"Yes","No") AS ReorderM1P1
FROM (tblDODAAC INNER JOIN (tblProduct INNER JOIN tbl16WeekQry ON
tblProduct.Product = tbl16WeekQry.Product) ON tblDODAAC.DODAAC =
tbl16WeekQry.DODAAC) INNER JOIN tblImpData ON (tblProduct.Product =
tblImpData.Product) AND (tblDODAAC.DODAAC = tblImpData.DODAAC)
GROUP BY tblDODAAC.DODAAC, tblDODAAC.LOCATION, tblProduct.Product,
tblImpData.MaxAuthLvl, tblImpData.ERQ;