I have a form of sailing school courses (an unbound form), with a list box of sessions (date, start and finish time, and instructor). I have a related (bound) form to permit changes to the sessions. This latter form has a pull down combobox of all available instructors. However, when I make a change to the instructor in the sessions form and return to the course form, the list box of sessions is not updated in the course form. It appears that the updating problem is ONLY with the instructor. If I go out and return to the course form, the sessions list box (instructor) is updated..
The session list box in the Course form is loaded as a row source in the form_0pen event thus:
Listbox and combobox controls are not dynamic, i.e. they do not refesh their data automatically once they are loaded. You need to use the Requery method of the object to force it to reload its data from the table or query it uses as its RowSource property:
Where ControlName is the name of the control (Listbox or ComboBox).
Appreciate the reply, but unfortunately didn't work. Been trying everything to force a save, or clean out the cache, or refresh or requery.Might actually try to throw in a pause. Probably is something so incredibly stupid.... Probably dawn on me at 3:00 AM.
The course form is reopened ("Docmd.openform....") before the sessions form is closed (DoCmd.Close....). The sessions form is also bound to the sessions table (I suspect that bound is a problem, especially when reloading the sessions list (via the rowsource property) in the form_open event of the course table.
I suspect I will have to install a manual update ("Docmd.runSQL("Update.......). Will try it, and let you know if the problem persists. Another defeat for sloth!