<div>Okay, in the midst of a gazillion projects so my mind is not thinking clearly...</div>
<div> </div>
<div>We previously had a process called within a screen that requests a letter to be sent.</div>
<div>We have processing in place that USED to work but doesn't seem to now?? Or perhaps it's been broken a while and we never caught it...who knows...anyways...</div>
<div> </div>
<div>From a screen, we can hit '4' to request a letter....it then looks up the letter file and is supposed to check the 'most recent date' we sent a letter and if that date is</div>
<div>less than 14 days from today's date, it's supposed to errorbox "last letter was sent" <x<"days ago, please make sure you wait 14 days";exit etc</div>
<div> </div>
<div>So in checking this out, it appears it's only grabbing the FIRST record that matches the account number (which is how we lookup to the letter file)</div>
<div> </div>
<div>So, the way it SHOULD work, is the lookup should look in the letter file at ALL records that match the account number and find the MOST RECENT letter and compare the date to today's date, etc......</div>
<div>I put a piece of code in to show me what value it was checking - apparently it's only finding the first record it locates by the account number and it's checking against THAT date -- </div>
<div>How can I put processing in place to lookup to the letter file by account number, then locate the most recent date instead of just the first record it finds?</div>
<div> </div>
<div>i.e. letter file contains 4 letter records for account number 123456 (it does a lookup by account number from our master file)</div>
<div>The 4 letter requests were sent on:</div>
<div>01/05/10</div>
<div>02/17/10</div>
<div>05/26/10</div>
<div>10/07/10</div>
<div> </div>
<div>Right now, when I put my msgbox to show me what date we're checking against, it's locating the first record, and checking today's date vs. 01/05/10 - and since it's more than 14 days ago, it allows them to request another letter - obviously not what I want to happen.....it needs to see we printed the last letter 6 days ago and should not allow them to request another one, etc.....</div>
<div> </div>
<div> </div>
<div>Thanks</div>
<div> </div>
<div>Scott</div>
<div>PDM</div>
<div> </div>
<div> </div>