Survivor Pool - Allow a user to select a team twice
Survivor Pool - Allow a user to select a team twice
I turned off the option to only allow a user to select a team one time. However, I would like to let the users pick the same team only twice. Anyone know how to do this?
Re: Survivor Pool - Allow a user to select a team twice
nevermind. was able to figure it out.
Re: Survivor Pool - Allow a user to select a team twice
Can you post what your solution was for anyone else that might want to do this in the future?
Phil
Phil
Re: Survivor Pool - Allow a user to select a team twice
Sure.
Create a query in the access database and call it whatever you want. In design mode for the query, paste the following in the sql view
SELECT [Username] & " " & [Pick] AS Expr1, SidePicks.Username, SidePicks.Pick
FROM SidePicks;
Create another query and call it whatever you want. In design mode for the query, paste the following in the sql view
SELECT First(SurvivorDuplicates1.Expr1) AS [Expr1 Field], Count(SurvivorDuplicates1.Expr1) AS NumberOfDups, SurvivorDuplicates1.Username, SurvivorDuplicates1.Pick
FROM SurvivorDuplicates1
GROUP BY SurvivorDuplicates1.Username, SurvivorDuplicates1.Pick, SurvivorDuplicates1.Expr1
HAVING (((Count(SurvivorDuplicates1.Expr1))>=2));
Everywhere you see SurvivorDuplicates1, you would have to rename to whatever you named the first query. Also, you can see at the end of this code that it has >=2. You can change this number to whatever number you want.
Next, In includes/side.asp, find the following code:
function GetUsedSidePicksList(username)
dim list, sql, rs
GetUsedSidePicksList = ""
sql = "SELECT Pick FROM SidePicks" _
where it says SidePicks, change this to whatever you named the second query we set up. That should do it.
Create a query in the access database and call it whatever you want. In design mode for the query, paste the following in the sql view
SELECT [Username] & " " & [Pick] AS Expr1, SidePicks.Username, SidePicks.Pick
FROM SidePicks;
Create another query and call it whatever you want. In design mode for the query, paste the following in the sql view
SELECT First(SurvivorDuplicates1.Expr1) AS [Expr1 Field], Count(SurvivorDuplicates1.Expr1) AS NumberOfDups, SurvivorDuplicates1.Username, SurvivorDuplicates1.Pick
FROM SurvivorDuplicates1
GROUP BY SurvivorDuplicates1.Username, SurvivorDuplicates1.Pick, SurvivorDuplicates1.Expr1
HAVING (((Count(SurvivorDuplicates1.Expr1))>=2));
Everywhere you see SurvivorDuplicates1, you would have to rename to whatever you named the first query. Also, you can see at the end of this code that it has >=2. You can change this number to whatever number you want.
Next, In includes/side.asp, find the following code:
function GetUsedSidePicksList(username)
dim list, sql, rs
GetUsedSidePicksList = ""
sql = "SELECT Pick FROM SidePicks" _
where it says SidePicks, change this to whatever you named the second query we set up. That should do it.
Re: Survivor Pool - Allow a user to select a team twice
Thanks for posting, I'm sure that will help someone out!!
Phil
Phil