Bean Machine
Member
- Local time
- Today, 01:34
- Joined
- Feb 6, 2020
- Messages
- 98
Hi everyone! I am attempting to make a query that returns the amount of users banned from the system. The only problem is that user data is associated with a username and for every item a user signs out an item on my database a new record sprouts with their associated username and status attached to it. So there are multiple records for one user that says they are banned, mainly because I want staff to absolutely know that the user is banned if they decide to search for that user, and because there are many records per student it was important to have that status attached to each record. Anyway, I am trying to make a query that counts multiple records of users banned status as just one (the query is of course grouped by user). I know something like this would give me a solid result if "[Banned?]" was not numerical and instead in "yes/no" format:
Count(IIf([Banned?]="Yes",1,Null))
What would I need to change to make it so it counts a number as the way to add one to the users banned column? Hopefully I described this well enough, I apologize for the choppy structuring. Any help is appreciated!
Count(IIf([Banned?]="Yes",1,Null))
What would I need to change to make it so it counts a number as the way to add one to the users banned column? Hopefully I described this well enough, I apologize for the choppy structuring. Any help is appreciated!