I have a database that tracks recommendations for people. So one of the tables contains a person's name, what they're recommended for, and the event number that the recommendation came from. e.g.:
John Doe, Head Honcho, 75
John Doe, Head Honcho, 74
John Doe, Head Honcho, 74
John Doe, Head Honcho, 73
I've also created a report that displays the name of the person, and counts the number of recommendations that were received for each person after the most recent event. So the report's dataset query would be restricted to only show records where the event = 75. Which results in a report that looks like this:
HEAD HONCHO RECOMMENDATIONS
_____________(75)
John Doe_______1
What I'd like to do is to create an unbound text box that would look up the person's record ID in another table (that isn't the recordset for the report) and count the number of times that person was recommended after previous events.
So the result would be:
HEAD HONCHO RECOMMENDATIONS:
__________(73)__(74)__(75)
John Doe____1____2_____1
with the (75) column being the only Bound text box, and the other 2 being calculated from the other table.
So basically I just need to know if there's any code to say "Look for John Doe in table 'Recommendations' and count how many times there's a '74' in the event field."
Hopefully that makes sense. And if it does, is there any way to do what I want?
John Doe, Head Honcho, 75
John Doe, Head Honcho, 74
John Doe, Head Honcho, 74
John Doe, Head Honcho, 73
I've also created a report that displays the name of the person, and counts the number of recommendations that were received for each person after the most recent event. So the report's dataset query would be restricted to only show records where the event = 75. Which results in a report that looks like this:
HEAD HONCHO RECOMMENDATIONS
_____________(75)
John Doe_______1
What I'd like to do is to create an unbound text box that would look up the person's record ID in another table (that isn't the recordset for the report) and count the number of times that person was recommended after previous events.
So the result would be:
HEAD HONCHO RECOMMENDATIONS:
__________(73)__(74)__(75)
John Doe____1____2_____1
with the (75) column being the only Bound text box, and the other 2 being calculated from the other table.
So basically I just need to know if there's any code to say "Look for John Doe in table 'Recommendations' and count how many times there's a '74' in the event field."
Hopefully that makes sense. And if it does, is there any way to do what I want?