2010-12-15 169 views
0

目的:訪問審計檢查+歷史塊!

- electronic form which displays 45 inspection points (rarely changes) 
- 3 additional columns 
    - Rating (0, 1, 2) 
    - CorrectiveAction (Immediate, SOP, WO) 
    - Notes 
- Maintain inspection history 
    - inspection date, production line inspected, production shift-crew inspected

表:

- Employee (empID (auto#), FName, LName, Shift, Line) 
- Audit Facts (ID#, textdescrip) tried with and without autonumber 
- Audit Details (auditID (auto#), auditdate, rating, action, notes) *(rating/action combobox)

的形式的子窗體具有45個檢查點的所有綁在審計號碼。但是,我無法讓審計結果記錄,存儲並進入歷史。

每次我做了嘗試產生PER每45個checkpts審計數量,而不是

Audit Date 
    AuditID(auto#) 
     AuditFact (list of 45 chckpts) 

結果

 
     Audit1, 10/02/2010 -> 
      *AuditPt  Rate  Action*   
       IF1   0  WO 
       IF2   2  SOP 
       ... 
       IF45   1  Immediate 

     Audit2, 12/15/2010 -> 
      *AuditPt  Rate  Action*   
       IF1   1  WO 
       IF2   0  SOP 
       ... 
       IF45   0  Immediate
+0

我仍然有理解這個問題。你熟悉ms-access嗎? – Fionnuala 2010-12-15 21:34:21

回答

0

讓您的表格右側&您的形式也會接踵而來。

原來的問題是不完全清楚,但我覺得有以下幾點:

  1. 的「審計」是一樣的一個「檢查」
  2. 收集 45 「檢查點」構成審計(不是每個單獨)。
  3. 「評級」和「操作」適用於,每個顯示點。

所以你的表要更喜歡這樣的:

Audit 
    AuditId (can be autonumber, or not...) 
    AuditDate 

AuditItem 
    AuditItemId (can be autonumber, or not...) 
    AuditId (FK from Audit) 
    InspPoint (e.g., the "IF1" from the "result" sample, or--better--an FK to it another table) 
    Rating 
    Action (Or--better--an FK to it another table) 

表「僱員」似乎完全無關,這strucure。

注意,每個切入口點在AuditItem,自己的行爲每個審計,而那些行同樣也從審計的AuditID,它可以讓你把它們放在一起讓你的輸出。

希望這會有道理 - 如果沒有,我建議檢討fundamental relational database design

+0

感謝您爲每個評級,行動,員工,InspectionPts嘗試tbls ...但在歷史保留中沒有成功。員工主要與Shift和ProductionLine相關(每天進行兩班輪班檢查和4條生產線=每天8次檢查) – Lisa 2010-12-15 23:56:10

+0

因此,可能需要將員工ID添加到審計表中,該表中*有歷史記錄*。檢查鏈接。 – RolandTumble 2010-12-16 00:39:27

+0

畢竟這些年的Accessdesign和這個'簡單'的數據庫已經是近一個月的戰鬥了....仍然,表'樹'不擴大。 – Lisa 2010-12-16 23:32:01