How does one refresh the underlying table of a form to make sure that deletions occur in the table after they've happened on the form? Here's the situation.
I'm building a query engine for a user. On the left side is a listbox with available fields for the query. On the right is a subform in continuous form with the fields selected for the query (see picture.
. When the user deletes a selected field (continuous form on the right), the On Delete sets a hidden check box to true. This acts as a flag to indicate the deletion. The flag is checked on the On Current event.
Okay. The Row Source of the list box is an SQL statement that only produces fields that have NOT been selected. Everything works fine, When a field is moved to the selected continuous form, it no longer shows in the list box. BUT after a deletion on the continuous form, when I requery the listbox, the field removed from the continuous form does NOT show up in the listbox. The reason is that even though the field HAS been deleted from the subform, it HASN'T been deleted from the table that is the datasource of the subform.
I've tried, requerying the form, refreshing...
Can anyone tell me how to force the underlying table of a form to refresh so that the deletion is captured?