Repost - Subform Updating main form

A

Allie

I have main form which is a summary of the subform( which
is a datasheet) When data is entered into the subform it
sums the following info to the main form - the number of
transactions, the number of each specific type of
transaction, and the amount of time used to complete all
the transactions (each type of transaction has a time
limit assigned)

I am having problems with the main form reflecting what is
actually on the sub form.

It was suggested that I use unbound fields in the footer
of the subform and then in the after update event of the
subform assign the values to the main form.

the problem is that the first transaction does not show on
the main form, however the subsequent transactions will
show. I have used the unbound field suggestion in the
subform - page footer and form footer and in the after
event of the form and the after event of the transaction.

Any suggestions?

Thanks
 
P

Pavel Romashkin

I have a feeling that your subform is 1 record behind on posting its
updates to the summary fields. This happens when you don't explicitly
requery the sf after an update. Try including Me.Requery in your code
for the sf before you calculate the summary information.
Please post your code for more specific advice as there is more than one
way of doing this.
You can pick up an example DB with working requeries here:
http://ainaco.com/access/db_samples/invoice_total.zip
Cheers,
Pavel
 

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