expression question on subforms

chefdaveross

Registered User.
Local time
Today, 14:05
Joined
Aug 31, 2007
Messages
81
I have 2 subforms loaded into one form.
One has pricing data and the other has yeild data.
I would like to be able to divide the last price on subform by my yeild percentage on my other subform and have the cost next to it

If I build the text box in yeild subform in expression builder it looks like this

Forms![ITEM2]![item_pricing subform1].Form![cost] / [percentage]

Item_id prep percentage Text6
1 cleaned 97.00% $2.84

My problem is that I would like to have the last record of:
Forms![ITEM2]![item_pricing subform1].Form![cost]

be divided by
[percentage]

Is there a last of expression I can use?
thanks
 
im not sure on exactly how to write it but a messy method that would prop work is to place your sum on the main form not the subforms. if you search the forums for a select record method you will find some methods on landing on a specific record this may then have to be put on the after update procedure of similar to get the correct record selected each time to populate the correct sum on the main form. sorry can be more help
 
I found that if i sorted my cost subform by date, that fixed my problem.
I just refereced the cost and it retrives the 1st price on the list. which is the latest date
problem solved
 

Users who are viewing this thread

Back
Top Bottom