S
SteveM
This is a repost to percolate the unsolved problem to the top:
***********************************************************
I have a Form with a Query source. The associated Table content is
updated with outputs from an Optimization routine.
When I FIRST open the form using code or even from a command button on
a switchbox, the underlying query is not updated to reflect the
optimization results. However if I close the form and open it again
from the switchboard, the query updates properly. This behavior is
not absolute. Sometimes the query will update properly when opened
the first time.
**********************************************************
Update: I've isolated the problem. The embedded query in the Form
does execute. However, an underlying Table that is updated by the
Optimizer is not refreshed until the Form is opened a second time. I
found some code and inserted it after the Optimization call but before
the OpenForm method to see if it would refresh the table:
CurrentDb.TableDefs.Refresh
DoEvents
That does not work. Asking again for ideas.
Thanks Again Too,
SteveM
***********************************************************
I have a Form with a Query source. The associated Table content is
updated with outputs from an Optimization routine.
When I FIRST open the form using code or even from a command button on
a switchbox, the underlying query is not updated to reflect the
optimization results. However if I close the form and open it again
from the switchboard, the query updates properly. This behavior is
not absolute. Sometimes the query will update properly when opened
the first time.
**********************************************************
Update: I've isolated the problem. The embedded query in the Form
does execute. However, an underlying Table that is updated by the
Optimizer is not refreshed until the Form is opened a second time. I
found some code and inserted it after the Optimization call but before
the OpenForm method to see if it would refresh the table:
CurrentDb.TableDefs.Refresh
DoEvents
That does not work. Asking again for ideas.
Thanks Again Too,
SteveM