Jumat, 24 April 2015

Re: [MS_AccessPros] Query to update child totals in parent record

 

Andrew-


You should never store a calculated field like this in a table.  I assume you're using a form to edit POHeader and a subform to edit POLines.  Make the subform a Continuous form and put a text box in the form footer:

=Count(*)

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Apr 24, 2015, at 1:58 PM, andrew@adwsystems.co.uk [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hi All,
Can anyone help with this one.
I have two tables POHeader & POLines, and the POHeader table has a field that keeps track of the number of line items.  I need a query that will update the NumLineItems field in the POHeader table with the correct count for the number of Line Items for that POHeader record, if you see what I mean.  I can easily do it using VBA, but I'm sure it could be done using a query, but I can't quite get it to work.
Any help greatly appreciated.
Thanks,
Andrew



__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar