Hi, I'm working on a access database project were I need to use the Microsoft Visual Basic editor.
Here's my problem I have a query with a field called AMPORDERFK this field keeps track of the number of ads that a client has, hypothetically every record could have the same value, they don't however.
What I need to do is count all the records that have the same AMPORDERFK value in this query and then output the count to a new table.
Example:
AMPORDERFK, Name
978, Tom
978, Tom
978, Tom
978, Jerry
583, Jerry
583, Jerry
583, Jerry
583, Tom
999, Tom
New Table:
AMPORDERFK, Tom's Count, Jerry's Count
978, 3, 1
583, 1, 3
999, 1, 0
Any help with programming this in a macros would be a huge help as I'm only a little familiar with SQL and visual basic
Thanks in advance,
Layth
Here's my problem I have a query with a field called AMPORDERFK this field keeps track of the number of ads that a client has, hypothetically every record could have the same value, they don't however.
What I need to do is count all the records that have the same AMPORDERFK value in this query and then output the count to a new table.
Example:
AMPORDERFK, Name
978, Tom
978, Tom
978, Tom
978, Jerry
583, Jerry
583, Jerry
583, Jerry
583, Tom
999, Tom
New Table:
AMPORDERFK, Tom's Count, Jerry's Count
978, 3, 1
583, 1, 3
999, 1, 0
Any help with programming this in a macros would be a huge help as I'm only a little familiar with SQL and visual basic
Thanks in advance,
Layth