L
Leonard Priestley
I have created a form which includes a subform. Data appearing in the
subform is summarised, and the results are passed to the main form, where
they control a thermometer display which I want to be able to change, to
reflect changes in the subform data.
The code to update the thermometer display is a public procedure in a
module. I have used the Form Current event to call the update routine so
that the thermometer display is updated when the form displays the next
record, or when the subform is altered. Once the database is open and
running, this works fine.
My problem is that when the form is loaded, it is apparently followed by a
Form Current event, calling the update routine, and this produces an error
message, because the update routine is referring to a textbox on the form,
which is not properly open yet.
It seems that I need to suppress the Form Current event at startup, or
introduce a delay until the form has been able to open. I wonder if anyone
can show me how to do this, or suggest another approach. It's probably
obvious that I'm still in the beginner class.
Leonard Priestley
subform is summarised, and the results are passed to the main form, where
they control a thermometer display which I want to be able to change, to
reflect changes in the subform data.
The code to update the thermometer display is a public procedure in a
module. I have used the Form Current event to call the update routine so
that the thermometer display is updated when the form displays the next
record, or when the subform is altered. Once the database is open and
running, this works fine.
My problem is that when the form is loaded, it is apparently followed by a
Form Current event, calling the update routine, and this produces an error
message, because the update routine is referring to a textbox on the form,
which is not properly open yet.
It seems that I need to suppress the Form Current event at startup, or
introduce a delay until the form has been able to open. I wonder if anyone
can show me how to do this, or suggest another approach. It's probably
obvious that I'm still in the beginner class.
Leonard Priestley