keek2a4
09-12-2007, 04:11 AM
I am using an access database and am trying to solve this function; I am pretty new to access and can?t seem to figure out how to do it. Here is what I am trying to do
I have two tables called
1. tblExamType: in this table I have field called examTypeID as Primary Key
2. tblExamDetails: in this table I have a field called fkexamTypeID as a Foreign Key.
Now in my Students Form, I have a subForm that has three tabs called Maths, Science and English.
What I want is when the user Clicks Maths tab, the tblExamDetails form is displayed and when the user enters in the date, the hidden field fkexamTypeID should update itself to ?1? (this is only when the user enters the date)
If the user clicks the Science tab, the same tblExamDetails form is displayed but this time when the user enters in the date, the hidden filed fkexamTypeID should update itself to ?2?
In my tblExamType table i have fields examTypeID and examName so it looks like this
examTypeID examName
1 Maths
2 Science
3 English
and in the tblExamDetails table the field fkexamTypeID looks like this
fkexamTypeID
1
2
1
3
2
this is based on users selecting which tab from the student form. I hope its clear what I am trying to acheive.
I have no clue how to start coding this in VBA and would really appreciate any help or direction you could point me to.
Kind Regards,
Ket
I have two tables called
1. tblExamType: in this table I have field called examTypeID as Primary Key
2. tblExamDetails: in this table I have a field called fkexamTypeID as a Foreign Key.
Now in my Students Form, I have a subForm that has three tabs called Maths, Science and English.
What I want is when the user Clicks Maths tab, the tblExamDetails form is displayed and when the user enters in the date, the hidden field fkexamTypeID should update itself to ?1? (this is only when the user enters the date)
If the user clicks the Science tab, the same tblExamDetails form is displayed but this time when the user enters in the date, the hidden filed fkexamTypeID should update itself to ?2?
In my tblExamType table i have fields examTypeID and examName so it looks like this
examTypeID examName
1 Maths
2 Science
3 English
and in the tblExamDetails table the field fkexamTypeID looks like this
fkexamTypeID
1
2
1
3
2
this is based on users selecting which tab from the student form. I hope its clear what I am trying to acheive.
I have no clue how to start coding this in VBA and would really appreciate any help or direction you could point me to.
Kind Regards,
Ket