Forum Discussion
VBA_Coder
Jan 14, 2023Copper Contributor
Access 2019 - List Box.Requery event on Main Form causes Sub Form Current event to trigger
I have a simple Main Form with one SubForm. On the Main Form I have a ListBox called "listItems" whose RowSource is set to a Query. If I issue a listItems.Requery, the Current event of the SubForm ...
VBA_Coder
Jan 14, 2023Copper Contributor
No, it's an unbound list box. What I'm trying to accomplish is to have the list box show summary information from the SubForm records, which is shown as a Datasheet.
arnel_gp
Jan 14, 2023Iron Contributor
what happens to the subform? does it change record?
you can add a Flag variable in your code that when you requery the listbox, set this flag to True.
then on the current event of the subform, check the status of the flag. if the status is True, reset the flag and immediately exit the sub.
we can only "detour" the default action of the form.
you can add a Flag variable in your code that when you requery the listbox, set this flag to True.
then on the current event of the subform, check the status of the flag. if the status is True, reset the flag and immediately exit the sub.
we can only "detour" the default action of the form.