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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select fields to display based on criteria

Status
Not open for further replies.
Apr 9, 2002
102
US
I have a query based off a crosstab query and every month, another month gets added to the crosstab query. I am trying to force the secondary query to always pick all the fields from the crosstab query based on the name of the field. I only want to show the fields that begin with "2010" (this would pickup fields "Jan - 2010 - Spending" and "Feb - 2010 - Spending", but exclude any fields not in that list) from the crosstab query in the secondary query without haveing to add each new field every month.

Example:

January - The crosstab query pulls project numbers and the spending for January.

February - The crosstab query pulls project numbers and the spending for each in January and February.

I know I can tell the secondary query to pull all the items from crosstab query and just remove the project number in another query, but I was trying to avoid having another query and getting it all done in one query.

Any ideas.

Marrow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top