Subform Relation Question

Xander117

Board Regular
Joined
Aug 3, 2011
Messages
66
New to access and working my way through with examples and other access templates. So here is where I am at.

I have a form with a subform on it. I have the master child set to an autonumber ID that is present on both forms (Hidden on the subform). The subform is built off a query if this matters. On the subform the user has a combo box and selects a type of error, and then fills in the amount of errors found for that type. Checks what portion he is fulfilling in the process. If there is more than one error type he would move to the next record in the subform, select a different error and so on. Works great, till I save then I end up with 1 record of the main form with all the information and a single record on the subform, and each new record for each additional record that was added.

What I intended it to do, was have all the information on the main form filled out and the subform contain all the errors. I have tried changing some of the master/childs to different fields that exist in both but same issue.

Any ideas I know its something simple Im not doing.

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You should not be using an autonumber field from BOTH tables as the link. Your child table should have the primary key of the parent table as the foreign key in it as a Long Integer and the autonumber should only be in the first one. For example, if I have an Orders table and an Order Details table, I would have fields like this:

tblOrders
OrderID - Autonumber (PK)
OrderDate
CustomerID

tblOrderDetails
OrderDetailsID - Autonumber (PK)
OrderID - Long Integer (FK)
ProductID
Qty

etc.

So in the master/child links I would have them set as OrderID. The autonumber in the child table (Order Details) is inconsequential for this process.
 
Upvote 0
Thanks Bob, sorry for the late reply I was gone all weekend. I ll take a look at it this morning I believe I know exactly what you are saying. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top