UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Total Based On Contents Of A Subview Table, Access 2013 Web App    
 
   
CaptElmo2165
post Mar 20 2017, 08:58 AM
Post#1



Posts: 62
Joined: 22-October 15



Hi Folks!

I have a subview with the lines from a contract, each of which has a line total for the value of the line. I was using a RIC to display the appropriate contracts lines on the Contracts List view, but was getting a weird error in which line items which start with a '0' weren't being displayed. So, I moved to a subview, which is working great, only now I can't find a way to display the total contract value by calculating the sum of each of the displayed lines. Can I do this using a datasheet subview or do I have to use a summary sub? frown.gif

I thought I'd seen Jeff conrad use some code in a txtbox like =calculation.sum or some such but can't find it anywhere.

Cap
Go to the top of the page
 
RobKoelmans
post Mar 21 2017, 12:05 PM
Post#2



Posts: 403
Joined: 25-November 14
From: Groningen, Netherlands


If you make a sum query with one or more parameters that gives you what you want, I'd call that with a datamacro on the OnCurrent Trigger and place it in an unbound textbox control on the main form.
Kind regards,
Rob
Go to the top of the page
 
CaptElmo2165
post Apr 5 2017, 09:38 AM
Post#3



Posts: 62
Joined: 22-October 15



Hey Rob,

Thanks for the reply, sorry for the slow return on my part (away with work again).

So, I've got a query setup to take the Contract Reference (ID from the Contracts table) as a parameter and screen Contract Lines against this - that gives me a list of all the instrumentation currently covered by the contract I'm interested in. I'm then running a total query on this query to total the values. My question though, is how do I get a dmacro to call that query and feed the relevant ID to it as a parameter?

I can grab the ID easy enough but how to call the query and extract the result from it?

Thanks so much,

Cap.
Go to the top of the page
 
RobKoelmans
post Apr 6 2017, 02:38 AM
Post#4



Posts: 403
Joined: 25-November 14
From: Groningen, Netherlands


Hi Cap,
LookupRecord and/or ForEach. (referring to the query instead of a table).
Kind regards,
Rob
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    28th June 2017 - 05:49 PM