Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access Queries
grouping error?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Bob Barrows, post: 7393211"] A little, but ... look back at the questions I asked. Did you answer them all? Again, I am not going to be able to provide a working solution. So have you downloaded the sample database containing the function you need? Once you import the module containing the function, you'll be able to use it in a query. The idea is to create two saved queries, the first to calculate the wins and losses per year: select [year],player, sum(wins),sum(losses) from tablename group by [year],player and a second that uses Duane's function (I forget the syntax so you will need to look at the documentation to get it exactly right): select [year],player, Concatenate("tablename", "[year],player","Team") As Teams from tablename group by [year],player Then join the two queries in a third query. Alternatively, a. you could forget about concatenating and use the crosstab query wizard to create a saved query to pivot the teams. Then join the two queries as above. b. you could forget about concatenating and simply display the teams in a subreport in the report that uses the first query to show the totals. Incidently, "Year" is a reserved keyword and should not be used for a field name. As it is the name of a VBA function, its use as a field name can lead to very hard to debug problems down the line. At the very least, you need to remember to use brackets around it when you use it in queries. A better solution is to simply rename the field, making it more descriptive so that two years from now, you'll be able to tell from looking at it what it's the year of. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access Queries
grouping error?
Top