访问审核检查+历史记录块!

时间:2010-12-15 21:22:14

标签: ms-access inspection

目的:

- 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个检查点都与审核编号相关联。但是,我无法将审计结果记录,存储并移入历史记录。

我所做的每一次尝试都会产生每45张检查数的PER值,而不是

 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

1 个答案:

答案 0 :(得分:0)

让你的桌子正确无误你的表格将随之而来。

最初的问题并不完全清楚,但我认为我得到了以下几点:

  1. “审核”与“检查”相同
  2. 45个“检查点”的集合构成审核(不是每个单独审核)。
  3. “评分”和“操作”适用于每个检查点。
  4. 所以你的桌子想要更像这样:

    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)
    

    表“员工”似乎与这种结构完全无关。

    请注意,每个Insection Point在AuditItem中都有自己的行,每个Audit 都有,并且这些行还带有AuditID中的AuditID,您可以将它们全部拉到一起以进行输出。 / p>

    希望这有意义 - 如果没有,我建议您查看fundamental relational database design