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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update next required field 1

Status
Not open for further replies.

vistor

Technical User
Dec 22, 2000
164
US
Hi all,

On Dec. 22 I posted this and received an answer but Did not understand what to do with the info.:


I have a table of classes. Students must take classes in a specific order for a
course of study. If class one and two are checked (this would be a Yes/No
field on the form/table?) I want the next class in the rotation to be automatically
highlited or somehow marked as the next class that must be taken.
Will Access do this?

################################################
something like this what you have in mind???

private sub Check1 After_update()
if me.check1 = -1 and check2 = -1 then me.check3 = -1
end sub
#################################################

The answer above looks good but I'm not sure of where to put the code. I have a students table and a class table. In the class table I currently have a class field and a Yes/No field to define if the class has been taken. I'm thinking that for the form I would have to change the Yes/No to a check box? Where would I put the code from the answer I received? Do I need a Macro for what I am trying to do???
 
Depends on when you want it to be checked. How do you access the student info?

Can you give us a list of fields on the form you have this info... and is the results from the checkboxes being saved in a table with the student's name/Id or whatever you use to pull the data in.

Mary :)
 
Can you give us a list of fields on the form you have this info... and is the results
from the checkboxes being saved in a table with the student's name/Id or whatever
you use to pull the data in.

So far on the form I have:
Student_ID, First_Name, Last_Name from the student.tbl
Semester, Combo Box with list of classes from the class.tbl

I am thinking I need a NEXT_CLASS_TO_TAKE field (This is the field I want Access to update depending on what is chosen from the combo box. This is what I am trying to get:

Current Semester is Spring, combo box has choices for Spring, depending on what is chosen (and can be more than one class), then ____ this is the next class that has to be taken.

And I do want the info updated to the tables
 
If I understand you correctly you want the student to see what the next class that they need to take is. if one and two are taken then you want the student to see that three is the next class to take. The Code that you have shown up above will just check the third check box if one and two are checked. I would say the easiest way would be to have a field that says what the next class that should be taken is. If this is what you are looking for let us know I need to check something first.

Walt III
SAElukewl@netscape.net
 
In the Form_Load Sub Have a set of if else statments

dim nextClass

If class1 = 0 then***indicating it is not yet taken
nextClass = class1
esle if class2 = 0 then
nextClass = class2
...
end if

txtNextClass = nextClass

end sub

txtNextClass is the name of your textfield for the next class

This SHould Work for you. IF you any more questions or problems feel free to ask

Walt III
SAElukewl@netscape.net
 
Do you have a table you are storing the student/class info? I mean does it contain the student_id and the class_id the student has taken?

Does the class.tbl track what the prerequisite class(es) is/are as well as the next course in line to take?

I'm trying to get a feel for the flow of your data as well as the table structure.

Mary :eek:)
 
Do you have a table you are storing the student/class info? I mean does it contain
the student_id and the class_id the student has taken?

No, I don't have this set up, but I seen now that I should
******************************************************

Does the class.tbl track what the prerequisite class(es) is/are as well as the next
course in line to take?
I'm trying to get a feel for the flow of your data as well as the table structure.

WALTIII's suggestion in string above: I would say the easiest way would be to have a field that says what the next class that should be taken is
******************************************************


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top