Hi
One thing that drives me to distraction is the opening of subforms and what strategy to employ when there are 0 records.
I guess most of you have seen this... Subforms get opened before mainform, but the criteria on which they are loading at any given time might retrieve 0 records. If they are not populated they don't open as such and then all references to them in the main Form_Open event fail left right and centre.
I have a 'my_form_is_loaded module' which can tell if they are open... helps to a degree... but catch 22... if they are not open, one can't call the subform form_open event because they aren't open... derrr
I have a dummy record '"No Records Found" in all my tables which I manipulate into the RS when there are no other records... but it's reams of code across en entire project.
Just wondered what strategies other people employed?
One thing that drives me to distraction is the opening of subforms and what strategy to employ when there are 0 records.
I guess most of you have seen this... Subforms get opened before mainform, but the criteria on which they are loading at any given time might retrieve 0 records. If they are not populated they don't open as such and then all references to them in the main Form_Open event fail left right and centre.
I have a 'my_form_is_loaded module' which can tell if they are open... helps to a degree... but catch 22... if they are not open, one can't call the subform form_open event because they aren't open... derrr
I have a dummy record '"No Records Found" in all my tables which I manipulate into the RS when there are no other records... but it's reams of code across en entire project.
Just wondered what strategies other people employed?