code to open TeacherDetailFrm form Mainform By double click on the FirstNameTxt..
Hi
I need code to open TeacherDetailFrm form Mainform.
I have TeacherStudentSubFr*m on the Mainform, FirstNameTxt on the
TeacherStudentSubFr*m, and TeacherDetailFrm.
I need code to open the TeacherDetailFrm By double click on the FirstNameTxt.
I use this code but no data come and query dialog box come.
Private Sub FirstNameTxt_DblCli*ck(Cancel As Integer)
Dim DocSubForm As String
Dim DocText As String
DocSubForm = "TeacherDetailFrm"
DoCmd.OpenForm DocSubForm, , , "[ FirstNameFld ]=forms![TeacherStudentSubFrm]!
[ FirstNameTxt]"
Can we rewind back to the beginning. What is the purpose of this database? It appears that you are trying to establish a class list for each teacher, by listing all the students that are in the teacher's class.
Is this correct?
1. The Teacher Student subform is a list of students.
3. The Teacher Detail form is used by the teacher to display
the full details of a student when the teacher clicks on the student's first name using the main form.
Sami
Have a look at the latest version. I used only 1 table tbl_student. Open the main_form and click on a student's first name and the full details for the selected student will be displayed.
Is this correct?
1. The Teacher Student subform is a list of students.
3. The Teacher Detail form is used by the teacher to display
the full details of a student when the teacher clicks on the student's first name using the main form.
1. The Teacher Student subform is a list of teacher and student.
3. The Teacher Detail form is used by user to display the full details of a teacher when he clicks on the first name using the main form.
Exactly I like as your correction (OpenDetailForm_v2.ldb) and display the full details of a teacher when the user clicks on the first name using the main form.
I need to solve this problem by anyway, by one table or two tables .... one query or two queries or......
I am confused with your previous replies.
1. I need code to open the TeacherDetailFrm By double click on the FirstNameTxt.
2. The Teacher Detail form is used by user to display the full details of a teacher when he clicks on the first name using the main form.
It appears that you want to do two different things when you click on the student's first name.
1. You want to display the teacher details when you select a student.
2. You want to display the teacher's detail when you select a teacher.
Have a look at the attached database. Does this meet your requirements?