Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Access guru's!

Status
Not open for further replies.

quinny1

Programmer
Oct 17, 2000
12
GB
Hi all,
I wonder if you can help. I am trying to write a query that sum's the value of a field in a table according to what the lookup value of this field is on a corresponding table.IE. Table "External elements" contains fields "Element name" and "Work Required". "Work required" is a text value which corresponds to a field name in a second lookup table "External lookup".The value of this field is numeric and represents the cost of the element.How can I write a query to run thru all the elements in "External elements" and sum the corresponding values in "External lookup". Or is it a case of structuring my tables differently. Thanks in anticipation.
Quinny
[sig][/sig]
 
Quinny1,

Hello? I Am Confused. I have attempted to illustrate the situation as:

'tblExtLoopUp
'[WrkReqA] [WrkReqB] [WrkREqC] [WrkReqD]
'$22.50 $875.59 $36.85 $98.99

'tblExtElem
'[ElName] [WrkREq]
'Fender WrkReqA
'Headlight WrkReqA
'FlatTire WrkReqC
'FrontWindow WrkReqC
'RearWindow WrkReqB
'Windshield WrkReqB


'So, we can say that I am confused.
'The aparent response is:
' tblExtLookUp!WrkReqA * Count(tblExtName!WrkReq) Where WrkReq = WRkREqA
' 45.00

Please explain where I misunderstand the question.


[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top