lyalem Posted October 14, 2004 Posted October 14, 2004 I'm trying to make a simple voting database for my school. I have 4 fields, one for each pres. candidate and two more for the student to indicate boy or girl. All of the fields are checkboxes I made them using a simple value list that just says "yes", but the students only see the check box. I made it this way so that our older kids could do some data collection after the voting (i.e. boys vs. girls voting for Rep. or Democrat). Two questions: Is a better way to do this, but more importantly, how do I prevent a student from voting for both candidates by mistake? I know there must be a way to have a pop up message come up that I could customize to tell students they can only vote once. Thanks for the help.
QuinTech Posted October 14, 2004 Posted October 14, 2004 A few ways: 1. Do not use normal checkbox behavior. Make each checkbox non-enterable in the field format properties, and Specify Button for each field (Right-click on field > Specify Button). For the checkbox for Kerry, for instance, the script would be: Set Field ( Bush , "" ) Set Field ( Kerry , "Yes" ) Set Field ( Nader , "" ) That way, anytime someone clicks a checkbox, the other 2 checkboxes are automatically cleared. 2. Seems like you could do this much more easily by making one field for Vote instead of a field for each candidate. Make Vote a radio button field using custom values "Bush, Kerry, Nader". When someone clicks a radio button, the other options in that field are automatically blanked. Now, an exceptionally clever student might find that he can select 2 by holding down the shift key and selecting a second candidate; but you can control for that using the scripting method described above. Another advantage of this second method is that it will probably make it easier for you to tabulate and analyze results using sub-summary parts. Jerry Hmmm. I can describe in 90 seconds how to design a voting machine, but Diebold still can't get it right after how many years? Funny, that.
transpower Posted October 14, 2004 Posted October 14, 2004 I agree with QuinTech: use a radio button. Have another file for candidates, one candidate per record. Relate the two files. Create a summary total field for the vote file and put this in the candidate file to show the total for each candidate.
QuinTech Posted October 14, 2004 Posted October 14, 2004 Transpower, i'm sorry, but i must disagree. I think creating a second file is far too complicated for what lyalem seems to be trying to do. It is easy enough to get the reports (s)he is looking for if the single file used is considered a file for Votes. Gender could reasonably be considered an attribute of that vote if all (s)he is looking for is a breakdown by boy/girl. Now, if lyalem were designing some sort of complex get-out-the-vote system, i could see using multiple files. However, i try not to recommend solutions that are unnecessarily complex. J
Recommended Posts
This topic is 7414 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now