updating record

Othello911

New member
Local time
Yesterday, 21:44
Joined
Oct 20, 2005
Messages
7
Greetings,
I have a form with a subform(sub1) that contains records. Also on the parent form is a subform that contains subtotals of the records on the (sub1) subform. When I add a record to the (sub1) form, I can't get the code to update on the subtotal subform unless I go to another record. what am I missing here?

Thanks!

O
 
Well, what I need to happen is to have some custom code run that will open a table and return all the records in that table that are related to a certian customerid number. THis works fine. except I have the code set to run on the exit event of subform 1. The code executes fine, but it does not seem to get the CURRENT value of the Current record that it is on. It will retreive all the other records though. However if on exit, I go to another record, and then click anywhere else, the code will execute fine. It is almost like the code is running before the record is saved.
So I tried saving the record first. No dice. Same problem. The only way I get the code to work, is

Sub Price_OnExit()
docmd.gotoRecord,,Previous
subtotal 'run sub to get total
end sub

This would be fine except if it is the first record, I get an error.
 
Are you using the LinkChild/MasterFields at all?
 

Users who are viewing this thread

Back
Top Bottom