I have a command button on a form that I want to run a query to return the most recent lab result for each type of test only for the MRN matching the current form frmPtReg.
The tblLabResult on which to run the query has the following:
tblLabResult
RecNum MRN AcctNum LabDate LabTest LabRes
1 3232323 7878788 5/27/2010 K 4.2
2 3232323 7878788 5/27/2010 HDL 170
3 3232323 7878788 5/27/2010 LDL 2005
4 3232323 7878788 5/28/2010 HDL 323
20 11111 222111 7/29/2010 BNP 23
21 11111 222111 7/29/2010 K 3.5
22 11111 222111 7/29/2010 CHOL 270
23 11111 222111 7/29/2010 HDL 200
24 11111 222111 7/29/2010 TRO 2.8
25 11111 222111 7/30/2010 TRO 2.1
I either get no records returned or records with the most recent results for all MRNs.
If the current frmPtReg has MRN of 3232323 I only want the records 1,3,4 returned with all fields but RecNum
Any help would be greatly appreciated- my deadline is close!
Thanks, CapnDave
The tblLabResult on which to run the query has the following:
tblLabResult
RecNum MRN AcctNum LabDate LabTest LabRes
1 3232323 7878788 5/27/2010 K 4.2
2 3232323 7878788 5/27/2010 HDL 170
3 3232323 7878788 5/27/2010 LDL 2005
4 3232323 7878788 5/28/2010 HDL 323
20 11111 222111 7/29/2010 BNP 23
21 11111 222111 7/29/2010 K 3.5
22 11111 222111 7/29/2010 CHOL 270
23 11111 222111 7/29/2010 HDL 200
24 11111 222111 7/29/2010 TRO 2.8
25 11111 222111 7/30/2010 TRO 2.1
I either get no records returned or records with the most recent results for all MRNs.
If the current frmPtReg has MRN of 3232323 I only want the records 1,3,4 returned with all fields but RecNum
Any help would be greatly appreciated- my deadline is close!
Thanks, CapnDave