View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Matt Cromer Matt Cromer is offline
external usenet poster
 
Posts: 8
Default Dynamic Field Selection - Calculation

I would like to replace the hard coded field names (i.e. [200626]) with
dynamic field names selected from a drop down box. The drop down box should
be created using field names from the history table...these field names
change weekly.

SELECT History.[Item Nbr], Sum(History.[200626]) AS SumOfField 1,
Sum(History.[200630]) AS SumOfField 2, Sum([200630]-[200626]) AS Change
FROM History