This topic is locked

Field to retain value

9/2/2009 10:26:20 AM
ASPRunnerPro General questions
J
jmccullough author

In my database, I need to assign 5 students to a team with each student being a separate record in my database for scoring purposes. On my ADD page can I have:

Team 1

Student1Fname StudentLname

Student2Fname StudentLname

Student3Fname StudentLname

Student4Fname StudentLname

Student5Fname StudentLname
I tried setting it up this way but when I hit "SAVE" it combined all of the first names into all of the Fname fields and all of the last names into the lastname fields and gave me an error of field size to large.

I need to set it up this way so that the users entering their students can see who they have assigned to each team. Can I set it up in the above format and hit "SAVE" after each student name is entered? If so, how can I retain "Student1Fname StudentLname" after hitting save so the the user knows which students they have assigned to a team?
Help please!!!

C
clig 9/2/2009



In my database, I need to assign 5 students to a team with each student being a separate record in my database for scoring purposes. On my ADD page can I have:

Team 1

Student1Fname StudentLname

Student2Fname StudentLname

Student3Fname StudentLname

Student4Fname StudentLname

Student5Fname StudentLname
I tried setting it up this way but when I hit "SAVE" it combined all of the first names into all of the Fname fields and all of the last names into the lastname fields and gave me an error of field size to large.

I need to set it up this way so that the users entering their students can see who they have assigned to each team. Can I set it up in the above format and hit "SAVE" after each student name is entered? If so, how can I retain "Student1Fname StudentLname" after hitting save so the the user knows which students they have assigned to a team?
Help please!!!


Quick and dirty would be to have a table with teamname, fullname, fname, lname
use inline add with a drop down in fullname as a concatenated fname + lname view from your student table
or you could just have an fname and a lname dependant on fname
before edit
you could do a lookup that pulls fname,lname based on full name from your view you created for the fullname dropdown then do an update to the record adding fname and lname

  • this is all dependant on fname + lname is always unique - which is highly unlikely in a student environment therefore it would be more ideal to have a unique identifier in your student table such as a student # or even just an index that could be bound to your team table and with queries display fname, lname based on identifier...
  • or simply have an inline edit page of the student table adding / editing the correct team # against each student (by adding that column to your student table)...