Write data to the table while the form is still open.

L

Lasse T

Now I have a control that calculates two values from a query. Sometimes I
need to change one of this values in the form. When I do that the result are
not updated until I either close and reopen the form or go to another post
and back again. I understand why, but I dont understand how to solve it. I
made a makro that goes to next post and back again when the next control in
the tab order is in focus but this feels like a Donald Duck solution.
I´m sure there is a much better way.

I also tried to make the control calculate the values directly from the form
instead of the query but the result was completely wrong. This are wery
strange becauce the value that destroys everything are just a "plain value"
directly connected to the table. I removed one value after another and found
witch value that goes wrong and as I said. Its a plain and simple value
connected directly to the form.


Lasse T
-------------
 
W

Wayne Morgan

You say the control makes a calculation on two values in a query and that
you can change those values on the form. Is the query that the values are
coming from the same query that is the RecordSource for the form or is it a
different query? If it is a different query, are those values available on
the form anyway (since you're changing them from the form)? What is the
Control Source of the textbox that does the calculation?

Have you tried a Me.Recalc in the AfterUpdate event of the controls you are
changing?
 
L

Lasse T

The question are more simple then i first wrote. When I switch between posts
in a form the table are beeing updated. How do I get the same result
whithout switching between posts?
I guess Me.Recalc in the AfterUpdate event of the controls are the right
solution and I will try that.

Thank you very much.

Lasse T
--------------

Wayne Morgan said:
You say the control makes a calculation on two values in a query and that
you can change those values on the form. Is the query that the values are
coming from the same query that is the RecordSource for the form or is it a
different query? If it is a different query, are those values available on
the form anyway (since you're changing them from the form)? What is the
Control Source of the textbox that does the calculation?

Have you tried a Me.Recalc in the AfterUpdate event of the controls you are
changing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top