Can you please assist with the below data entry form i am trying to create that involves a Many to Many relationship--thanks in advance:
My M:M logic:
- An Audit can have many Error Messages. And an Error Message can belong to many Audits.
- There are only three error messages.
Requirements:
- I would like to create a data entry parent Form called frmAudit with a child Subform called subErrorMsg.
- For every new AuditID in the parent form , I would like the Subform to automatically create three new records in field ErrorMsgID with the values 1,2 & 3 respectively. And next to each ErrorMsgID in the subform I would like to have the field Error count, which will let the user enter the Error Count for each of these error messages.
This data would then obviously be recorded in the junction table: tblAuditErrorMsg.
Can you please assist with any information that will help me set this data entry parent/child form?
As a FYI I have created the following tables (shown below) showing the M:M relationship. I have also included some dummy data for each table further below, and an example of what I would like the form to look like.
tblAudit AuditID (PK - autonumber) AuditName 1
tblErrorMsg ErrorMsgID (PK – autonumber) ErrorMsgName 1 Incorrect Details 2 Omitted Details 3 Overwrite
tblAuditErrorMsg AuditErrorMsgID (PK – autonumber) AuditID (FK) ErrorMsgID (FK) ErrorCount 1 1 1 20 2 1 2 15 3 1 3 11 4 2 1 8 5 2 2 23 6 2 3 43 7 3 1 12 8 3 2 42 9 3 3 3
frmAudit (example):
AuditID: 1
AuditName: January Audit
Error Messages (Enter the error count for each each error message below):
1. Incorrect Details Error Count: _____
2. Omitted Details Error Count: _____
3. Overwrite Error Count: _____