Very new to VBA and struggling to link the main form and the subform to the same record in the same table. Currently they are each entering separate records in the same table.
They are linked by the date in the parent-child connection and both contain a date textbox, the only difference is that the main allows the user to enter the date and the date is invisible on the subform.
I have tried a few pieces of code that I have found on similar boards across the internet but none seem to work for me. I feel like part of the problem is that I don't know where exactly I should put it - ie. onentry, beforeupdate, etc.
As some further background to this problem, the purpose of having linked record form and subform entries to the same table is that the subform pops up based on selection on the main form to allow further entry if needed. I don't want to make it a tab because I'm trying to poka yoke this process to prevent addition entry where it is not needed.