I have a tbl that I do a search on and when I get the results I place the record selector beside the record I want to look at and then press the View Detail cmd button. It takes me to the form I want but does not show the record I am looking for. The form is built from a query.
Here is the code behind the view detail:
Private Sub cmdViewDetail_Click()
Dim strLinkCriteria As String
Dim strDocName As String
If Not IsNull(Me.txtCaseTrack) Then
strLinkCriteria = ([Case Track Nbr] = """ Me.txtCaseTrack & """)
End If
If Me.txtCaseType = "MED" Then
If Me.txtLocation = "Prospects" Then
strDocName = "frmMedProspects"
DoCmd.OpenForm strDocName, , , , acFormEdit
Me.Filter = strLinkCriteria
Me.FilterOn = True
End If
Else
......
End If
This takes me to the correct screen but does not find the record it does not even appear that it tried to locate the record. It just shows the first record in the query result as if no find has been requested.
Please if someone has an answer I would appreaciate the help.
Here is the code behind the view detail:
Private Sub cmdViewDetail_Click()
Dim strLinkCriteria As String
Dim strDocName As String
If Not IsNull(Me.txtCaseTrack) Then
strLinkCriteria = ([Case Track Nbr] = """ Me.txtCaseTrack & """)
End If
If Me.txtCaseType = "MED" Then
If Me.txtLocation = "Prospects" Then
strDocName = "frmMedProspects"
DoCmd.OpenForm strDocName, , , , acFormEdit
Me.Filter = strLinkCriteria
Me.FilterOn = True
End If
Else
......
End If
This takes me to the correct screen but does not find the record it does not even appear that it tried to locate the record. It just shows the first record in the query result as if no find has been requested.
Please if someone has an answer I would appreaciate the help.