mizenerman
MIS
Hi again all. I have a form called Clinic. In this form is a subform. The Parent/Child link between the two forms is the Clinic Date field. What I'm attempting to do is dbl-click a field called MRN (number field) on the subform which will go to the corresponding patient record. I found this thread and it works great:
thread702-1316412
However, the problem is that it's possible to have duplicate patient records with duplicate MRN (with different clinic dates). The code in the above thread will find only the first occurance of the MRN field. What I would like to do is have it first find the clinic date on the form then look for the MRN on all records with the same date. Possible? Below is the code in question:
Private Sub MRN_DblClick(Cancel As Integer)
Dim frm As Form
Set frm = Forms(Me.Parent.Name)
frm.Recordset.FindFirst "[MRN] = '" & Me![MRN] & "'"
Set frm = Nothing
End Sub
thread702-1316412
However, the problem is that it's possible to have duplicate patient records with duplicate MRN (with different clinic dates). The code in the above thread will find only the first occurance of the MRN field. What I would like to do is have it first find the clinic date on the form then look for the MRN on all records with the same date. Possible? Below is the code in question:
Private Sub MRN_DblClick(Cancel As Integer)
Dim frm As Form
Set frm = Forms(Me.Parent.Name)
frm.Recordset.FindFirst "[MRN] = '" & Me![MRN] & "'"
Set frm = Nothing
End Sub