91
ห้อง MS Access / : กรองข้อมูลด้วย Combo Box และ Check Box และการค้นหาข้อมูลที่กรองยังไงครับ
« เมื่อ: 04 ต.ค. 62 , 09:31:39 »
ขอบคุณมากครับ
โพสต์นี้ได้รับคำขอบคุณจาก: SakDa
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
SELECT
[Month-Year], Inprogress, Complete,
[Inprogress]+[Complete] AS Total,
Format([Complete]/([Inprogress]+[Complete])*100,"0.00") AS [% Complete]
FROM
(SELECT Format([dt],"mmm-yyyy") AS [Month-Year],
First(Month([dt])) AS M,
First(Year([dt])) AS Y,
First(Val(DCount("*","TB","Status = '2' and Type = '1' and (month(dt) = " & Month([dt]) & ") and (year(dt) = " & Year([dt]) & ") "))) AS Inprogress,
First(Val(DCount("*","TB","Status = '1' and Type = '1' and (month(dt) = " & Month([dt]) & ") and (year(dt) = " & Year([dt]) & ") "))) AS Complete
FROM TB
GROUP BY Format([dt],"mmm-yyyy")) AS Q1
ORDER BY Y, M;
SELECT Format([workorderDate],"mmm-yy") AS [Date],
DCount("[workstatusID]","[tbl_workorder]","[workstatusID"="1") AS Inprogress
FROM tbl_workorder
GROUP BY Format([workorderDate],"mmm-yy"), tbl_workorder.worktypeID
HAVING (((tbl_workorder.worktypeID)=1));
SELECT tbl_DLV.ID, tbl_DLV.Weight_Chg, tbl_Area.Zone, tbl_DLV.Total_Exception, tbl_DLV.VAS, tbl_Remote.Amount, Nz([Total_Exception])+Nz([VAS])+Nz([Amount]) AS Audit, IIf([Weight_Chg] Between 1 And 2,"1") & IIf([Weight_Chg] Between 3 And 4,"3") & IIf([Weight_Chg] Between 5 And 9,"5") & IIf([Weight_Chg] Between 10 And 14,"10") & IIf([Weight_Chg] Between 15 And 19,"15") & IIf([Weight_Chg]=20,"20") AS Weight_ChgRate, IIf([Zone]="BKK",DLookUp("BKK","tbl_Rate","Weight = " & Nz([Weight_ChgRate],0))) & IIf([Zone]="UPC1",DLookUp("UPC1","tbl_Rate","Weight = " & Nz([Weight_ChgRate],0))) & IIf([Zone]="UPC2",DLookUp("UPC2","tbl_Rate","Weight = " & Nz([Weight_ChgRate],0))) AS Rate
FROM tbl_Remote RIGHT JOIN (tbl_Area RIGHT JOIN tbl_DLV ON tbl_Area.Postal_Code = tbl_DLV.Postal_Code) ON tbl_Remote.Postal_Code = tbl_DLV.Postal_Code;
ขอบคุณครับ ผมยังต้องปรับขนาดกระดาษ และ รูปภาพ ด้วยครับเพราะกระดาษที่ใช้พิมพ์มีขนาดประมาณ 3*5 นิ้ว ครับ
ยังหาที่ปรับไม่ได้...แต่จะมีประโยชน์สำหรับผู้ที่ทำเต็มกระดาษเอ4ใช้ได้ทุกกลุ่มสาระการเรียนรู้
เลยครับ