HillTJ
To train a dog, first know more than the dog..
- Local time
- Today, 08:53
- Joined
- Apr 1, 2019
- Messages
- 731
So, I have a form containing a subform. That subform is a continuous form including a control to open a popup/modal form to display filtered records, based upon the [HiveID]. The PK of that subform.
I use DoCmd.OpenForm "frmHivePhotos", , , "HiveID = " & HiveID, , , Me.[HiveID] on the subform to open the pop up form and display only the filtered photos. And on the pop up form i use the openargs value passed as the FK for adding new records. This works fine for filtering existing records, but does not work on a new record where there is clearly no existing HiveID to filter on. In this instance, the pop up form opens but shows no fields at all.
Clearly, i have my logic wrong & would appreciate recalibrating.
I use DoCmd.OpenForm "frmHivePhotos", , , "HiveID = " & HiveID, , , Me.[HiveID] on the subform to open the pop up form and display only the filtered photos. And on the pop up form i use the openargs value passed as the FK for adding new records. This works fine for filtering existing records, but does not work on a new record where there is clearly no existing HiveID to filter on. In this instance, the pop up form opens but shows no fields at all.
Clearly, i have my logic wrong & would appreciate recalibrating.