My forms arent working correctly. 99% sure the reason is the parentID from parent form doesnt show up if there are no records in the child form. It works fine if there are records in the child form which belong to the parentID_FK but clicking the child form from parent when there arent records with that parentID_FK shows no parentID, I checked, but not sure why or what I can do. The onclick event to open the child form from parent form looks like
OpenForm frm_Child
where =="[ParentID]=" & [ParentID_FK]
When you open the child form it should get info from that ParentID_FK and fill in data from the parent table based on the ParentID_FK, which also only works if there are child records with that parentID_FK.
Is there a better way to open the child form? It works great if there are child records with the parentID. And I half understand why its not working. That open form macro im using is designed to show records that belong to the parentID - if there are no records that belong to the parent then it doesnt show anything, even the parentID.
Do you have any ideas? Thanks