Problem requering chart on subform.

  • Thread starter Thread starter Meelis Kuris
  • Start date Start date
M

Meelis Kuris

Hello!

I have already searched the net and tried everything I can
think of but no success...

I have a form with all kind of comboboxes, a button
and a subform. On the subform is a chart.
When I click the button, it executes some code which
puts data into a temporary table and this chart on the subform
displays this data. Of course, after new data is put into table,
I need to do 'requery' to the chart on subform.
So I have under Button1_Click among other code a line:
SubForm1!Graph0.Requery

But I get an error saying:
"Run-time error '2118':
You must save the current field before you run Requery action."

(Interesting is that if I put a button for requering chart on subform
itself,
I won't get such an error. Even more weird is that after having pressed this
button on subform once, also the original button on main form
works ok with no error!)

Any comments are welcome.

Meelis
 
Hi again,

I solved the problem. I still don't know what this error
really means or why I get it but by experimenting I found out that I get the
thing working by adding a line before requery:
SubForm1.SetFocus

So I got no explanation but at least a solution :-)

Best regards,

Meelis
 
Back
Top