How To Make 2 SubForms Go To the New Record With The Main Form?

cwats

Registered User.
Local time
Today, 06:08
Joined
Feb 20, 2019
Messages
40
I have two sub forms on a main form that i need to go to the new record when the main form is navigated to the New* Record. SubFrm1 is a continuous form and SubFrm2 is a form that pulls info from the main form controls and calculates the results.



The Problem is when subform 1 pulls ingredients from a previous record when you start adding a new record. Is there a vba code or property setting that i can use to make both subfrm1 and subfrm2 navigate with the main form?





View attachment Screenshot (1544)_LI.zip
 
Hi. Are the subforms properly linked to the main form through the link master/child fields?
 
theDBguy,



Yes they are properly linked by using Product_ID from the main products table and Product_ID from a junction table that saves that list of ingredients.



The junction table is called product powders with the following,



ProductPowders_ID
Product_ID
RawPowders_ID
MgPerServing
 
So, if the main and subforms are properly linked, then you shouldn't need any code to make it work. The link should dictate what the subforms will show. If the main form is on a new record, then the subforms should automatically be on new records as well. No code needed.
 
I moved subform1 back to the details section of the form and it seemed to fix the problem. I had subfrm1 in the header section and that was causing some kind of miscommunication.



Thank you all for providing ideas to fix this.
 
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom