|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Luis5011 in Access Coding/Macros
I have a table in Access that lists hospital discharge dates and another table that lists dates when the member was contacted by a post discharge nurse. One discharge can have multiple discharge calls. What I need is code that will go through my discharge table based on a member's id and finds all of the discharges associated for that members and then looks at this other table and finds the contact date that's closest to the respective discharge date.
So, if I had a member that was discharge on 7/1/2009 followed by a call on 7/3/2009 and one on 7/15/2009, I would want to capture only the 7/3/2009 date in my results table. Once the code determined that that was the only discharge for that member, it goes and finds the data for the next member on the list. So it keeps looping until it reaches the end of my table.
Can someone help me write this code...as soon as humanly possible. I've lost a lot of time trying to do this with regular queries which just turned out to be a big mess.
Thanks,
Luis
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625