Copying Value From A Calculated Field In A Subform From A Dirty Field On The Subform

Adam858

New member
Local time
Today, 14:06
Joined
Jul 6, 2010
Messages
8
Hi,

I bet this is a really easy one if you know what you are doing! Unfortunately I don't!

Please see my attached db which is a slightly modified version of the northwind db.

I simply want to copy the calculated order "total" field to an unbound field on the same main form called "totalpaid", this works unless there is dirty data in the subform.

If you run the northwind database I have attached you will see the northiwind orders form where I have my issue with the subform.

If you edit the value in the unit price field without pressing enter (i.e. leaving the cursor in the unit price field and leaving the subform dirty) you can click the refresh button (which refreshes the main form) then click the command66 button which then successfully copies the correct value to the unbound field "totalpaid"

This works great but I need this to work with just one button. So I have tried combining the refresh code and the copy code but the form does not refresh in the same way and the dirty data gets ignored.

So then I created a button that calls the refresh button then calls the command66 button but still get the same problem.

Is there some sort of break or pause function I can set to make access wait for the calculation to happen before it copies the data across?

Thanks in anticipation!

Adam
 

Attachments

Problem now solved, needed parent.recalc in the after update event of the sub form.

All the best

Adam
 

Users who are viewing this thread

Back
Top Bottom