Microsoft Access Query or Table ???? Please help me.

Thread Solved

Join Date: Sep 2008
Posts: 9
Reputation: roxys is an unknown quantity at this point 
Solved Threads: 0
roxys roxys is offline Offline
Newbie Poster

Microsoft Access Query or Table ???? Please help me.

 
0
  #1
Aug 27th, 2009
Hello,

I have a problem and I hope someone could help me with this.

I have a student registration database.
The case is that there is courses that student can register in.
And when they register there a groups formed for the courses. So there may be 2 groups that give the same course depending on how much students register.

The courses are divided in two levels, so there are courses that is level1, and level2.

The level 1 courses are teached in one day. So they are one day course.
The level 2 courses are teached in 5 days. so they are a 5 days course.

The students can only make the exam if they attend to the courses.
For the 1 day course they have to attend 1 time.
For the 5 days course they have to attend at least 3 times.

So I have made a query which I get the list of the students that can make the exams. That was easy.

But now I have to add a mark field for only the students that was allowed to attend to make the exams.

My problem is now that I don't know how to incorporate this table. So I can register the marks for the students that only was allowed to take the exams.
The exams are a one time exam, so that determine if you pass the course.

Please help me.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,330
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 162
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Microsoft Access Query or Table ???? Please help me.

 
0
  #2
Aug 27th, 2009
add the marks column to the database default blank/fail
enable it with a query that enumerates the same output as the prior attendance query and asks you to update the mark fields, for each row in the result array
can be all records or single records
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 9
Reputation: roxys is an unknown quantity at this point 
Solved Threads: 0
roxys roxys is offline Offline
Newbie Poster

Re: Microsoft Access Query or Table ???? Please help me.

 
0
  #3
Aug 27th, 2009
Originally Posted by almostbob View Post
add the marks column to the database default blank/fail
enable it with a query that enumerates the same output as the prior attendance query and asks you to update the mark fields, for each row in the result array
can be all records or single records

Hi, thanks for your answer, but I have a question,
Could be more specific ?
Should I make a table and add only the marks field in it ? Could you explain that a little more ?

And what do I have to do in the query?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,330
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 162
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Microsoft Access Query or Table ???? Please help me.

 
0
  #4
Aug 27th, 2009
if a student can only attend 1 course, add the column to the student table
if the student can attend more than one course create a table
marks (id,student_id,course_id,mark)
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 9
Reputation: roxys is an unknown quantity at this point 
Solved Threads: 0
roxys roxys is offline Offline
Newbie Poster

Re: Microsoft Access Query or Table ???? Please help me.

 
0
  #5
Aug 27th, 2009
Originally Posted by almostbob View Post
if a student can only attend 1 course, add the column to the student table
if the student can attend more than one course create a table
marks (id,student_id,course_id,mark)
Ok, but I have another question,
Do I have to make a query or how can I do, because I don't know to only insert marks for only the students that are allowed to take the exams ?
Because only the students that are allowed to take the exams are going to get marks.

Can you help me with that now?
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,330
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 162
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Microsoft Access Query or Table ???? Please help me.

 
0
  #6
Aug 27th, 2009
you already have a query that prints a list of the students able to take the exams
ingonring the bad code for the moment (really bad code)
and the poor field names
output a table in a form something like
  1. <?php echo '<table>';
  2. for each $output ++{echo "<tr><td>$lastname</td><td>$firstname</td><td>$coursename</td><td><input 'name='mark' value='$mark'></td></tr>"; }
  3. echo "</table><input type='submit'value='update marks'></form>"; }
and have the form submit to a script(or self) to update table marks with the marks data
it is a thought exercise this code does not work
Last edited by almostbob; Aug 27th, 2009 at 3:36 pm.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 9
Reputation: roxys is an unknown quantity at this point 
Solved Threads: 0
roxys roxys is offline Offline
Newbie Poster

Re: Microsoft Access Query or Table ???? Please help me.

 
0
  #7
Aug 27th, 2009
Originally Posted by almostbob View Post
you already have a query that prints a list of the students able to take the exams
ingonring the bad code for the moment (really bad code)
and the poor field names
output a table in a form something like
  1. <?php echo '<table>';
  2. for each $output ++{echo "<tr><td>$lastname</td><td>$firstname</td><td>$coursename</td><td><input 'name='mark' value='$mark'></td></tr>"; }
  3. echo "</table><input type='submit'value='update marks'></form>"; }
and have the form submit to a script(or self) to update table marks with the marks data
it is a thought exercise this code does not work
Hi, I appreciate you are helping me with my problem.
The php statement that you wrote, do you know how to write the statement in sql, because i use the sql statement.

I hope you can help me, because I am finally seing a light in the horizon.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,330
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 162
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: Microsoft Access Query or Table ???? Please help me.

 
0
  #8
Aug 28th, 2009
Originally Posted by roxys
I have an course_enrollment table, and I have a group_student table. The group_student table has the students that belong to the groups. But there a students that have enrolled for courses and they has not been placed in a group yet. Do you know how can I make an query in access that can give me the students that have not been enrolled in a group yet.

Sorry to bother you, but you seems to me a good help.
making assumptions
course_enrolment:id unique autoincrement, lastname,firstname, //and others
group_students:id unique autoincrement,group,student_id, //and others where student_id is the foreign key relating the two tables
select from course_enrollment * where id .... is not in the groups table, table joins mess me up
TRY

  1. SELECT * FROM course_enrolment WHERE id NOT IN (SELECT student_id FROM group_student)
in access it would be something like
SELECT course_enrollement.[*],group_student.[id]
FROM course_enrollment INNER JOIN group_student ON course_enrolment.id = group_students.student_id HAVING (((group_students.[student_id]) Is Null));
have used access twice in my life, don't trust this code
Last edited by almostbob; Aug 28th, 2009 at 1:51 am.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC