I suspect the problem is that the button "action" of "refresh form" refreshes both the form and the listboxes. The macro "reload form" only refreshes the form and the listboxes have to be refreshed separately.
If the macro is triggered by the listbox events "item status changed" this should work for all the listboxes on the subform "Filter":
Code: Select all
Sub RefreshForm (oEvent as Object)
oForm = oEvent.Source.Model.Parent
oEvent.Source.Model.commit() 'save the List Box selection to the host data-Form
'save all changes to the MainForm's Table... compiler bug doesn't allow comments on an IF-THEN-ELSE line
IF oForm.isnew THEN oForm.insertRow() ELSE oForm.updateRow()
oForm.GetByName("Products").reload 'reload the SubForm's individually to avoid jumping to the first record
REM Listboxes have to be refreshed individually
oForm.lstF_ID_GROUP.refresh
oForm.lstF_ID_INGREDIENT.refresh
oForm.lstF_ID_KEYWORD.refresh
oForm.lstF_ID_INDICATION.refresh
oForm.lstF_ID_PURPOSE.refresh
oForm.lstF_ID_BODYPART.refresh
oForm.lstF_ID_BODYTYPE.refresh
oForm.parent.lstF_ID_SYSTEM.refresh
End Sub
A different macro (or a IF statement checking the form name) would be needed for the SYSTEM listbox that is on a different subform. Let us know if that helps.