Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays? Maybe?

Status
Not open for further replies.

rdeleon

IS-IT--Management
Jun 11, 2002
114
US
Problem:

I have to track a weekly scoring for conduct activity over 5 types of conduct. For each day for each type of conduct, a student scores a 0 or 1 for a total of 35 (5*7) possible points/week.

I am thinking that I only really need to track the zeroes, because they will be the exceptions, but I need to know what day and what type of conduct they received a zero for.

I started out by having 35 text boxes for the user to enter a 1 or 0, but I don't know how to identify which boxes have zeroes to store the date and conduct type.

I am relatively new to Access, so I would appreciate a little hand-holding in any suggestions. Thanks in advance.

Rene'
 
Hi,
You could try the following approach:

1) Create a table called tblConductScores with the following fields:

Student Id Number
weekDate Date/Time Format: Short Date
Conduct1 Number Default Value : 1
Conduct2 Number Default Value : 1
Conduct3 Number Default Value : 1
Conduct4 Number Default Value : 1
Conduct5 Number Default Value : 1

2) Create a table called tblStudentDetails with the following fields:

studentId AutoNumber
Student Name Text

3) Create a form called Conduct Entry with the following controls:

One list box
Five Text boxes for each of the conducts.
One command button

4) Name of list box : lstStudent
RowSource : "Select * from tblStudentDetails"
Column Count : 2

5) Name of command button : cmdSave
In the Click event of the button, put in code to save the values in the text boxes to the table.

The process works as follows:

All the students get listed in the list box, lstStudent.

The user selects a particular student and enters values ( 0 or 1 ) in the text boxes for each of the 5 conducts.

The user clicks on the cmdSave button to store the conduct details of the student along with the current date to the table tblConductScores.

This works under the assumption that the teacher inputs the scores once a day. Care should be taken to ensure that conduct scores for a student for a date are not entered twice.


Post if you want something else.


Hope it helps. Let me know what happens.
With regards,
PGK
 
Your approach is sort of what I initally was going to try, but I am trying to avoid saving all 35 possibilities each week. The student starts out with 35 points and the average point loss for each student is between 5-10, so I want to try and avoid storing the 25-30 day/conduct combinations that are = 1, because this is the default.

Is there any way to set up 35 text controls and do a FOR EACH loop through them to find the controls who value is zero? If I could identify these, then I could just store the date and conduct for the 0 valued controls.

Thanks in advance,
Rene'
 
Hi,
If that is the case, try the following approach:

1) Create a table called tblConductScores with the following fields:

StudentId Number
Conduct Text
Date Date/Time Format: Short Date

2) In the entry form, habe the following controls:

One text box ( for entering student id)
One drop down box ( for listing the available conducts)
One text box ( for entering the date for which the score is entered)

One command button

3) When the teacher wants to enter a 0 for a student, he/she enters the student id, selects the conduct for which the student is being awarded a 0 and the date for which the student is awarded a zero in the particular conduct.

4) Clicking on the command button stores these details in the tblConductScores table.


Care should be taken to ensure that there is only one entry for a particular student id, conduct and date combination. If there is an entry in the table, it means that the student has been awrded a 0 for the conduct on the date stored. Hope it helps. Let me know what happens.
With regards,
PGK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top