need code to open the TeacherDetailFrm By double click on the FirstNameTxt.

  • Thread starter Thread starter SAMI via AccessMonster.com
  • Start date Start date
S

SAMI via AccessMonster.com

Hi
I need code to open TeacherDetailFrm form Main form.

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]"

End Sub

I like to upload the file but no way in this forum.

thanks
 
try this....also...did you notice you have a space in the front here >[
FirstNameTxt] and here > [ FirstNameFld ]

Private Sub FirstNameTxt_DblClick(Cancel As Integer)
Dim DocSubForm As String
Dim DocText As String
DocSubForm = "TeacherDetailFrm"
DoCmd.OpenForm DocSubForm, , , "[ FirstNameFld ]='" & forms!
[TeacherStudentSubFrm]!
[ FirstNameTxt] & "'"

End Sub

J
 
HI JConsulting

I do as you wrote but it still problem.
How I upload the file to show you

Private Sub FirstNameTxt_DblClick(Cancel As Integer)
Dim DocSubForm As String
Dim DocText As String
DocSubForm = "TeacherDetailFrm"
'DocText = "[Result]=" & "'" & Me![result] & "'"
DoCmd.OpenForm DocSubForm, , , "[ FirstNameFld ]="" & forms!
[TeacherStudentSubFrm]![FirstNameTxt]& """

End Sub
 
JConsulting said:
try this....also...did you notice you have a space in the front here >[
FirstNameTxt] and here > [ FirstNameFld ]

Private Sub FirstNameTxt_DblClick(Cancel As Integer)
Dim DocSubForm As String
Dim DocText As String
DocSubForm = "TeacherDetailFrm"
DoCmd.OpenForm DocSubForm, , , "[ FirstNameFld ]='" & forms!
[TeacherStudentSubFrm]!
[ FirstNameTxt] & "'"

End Sub

J
Hi
I need code to open TeacherDetailFrm form Main form.
[quoted text clipped - 17 lines]

thanks for your solve problem you are right
 
Back
Top