Stanley, your first question has been answered by Bill in regards to utilizing lookup -<br><br>As far as your second question, try putting InRecNum in parentheses, I use long variable all the time in lookups with a key field and it requires the parentehses, I haven&#39;t tried with record number lookup though<br>
<br>lookup cust = customer r=(InRecNum)  -n<br><br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 2:38 PM, Stanley - stanlyn-com <span dir="ltr">&lt;<a href="mailto:stanley@stanlyn.com" target="_blank">stanley@stanlyn.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
<br>
<br>
I&#39;m sort of embarrassed to ask such a question after the hundreds of<br>
thousands of filepro coding I&#39;ve written.  I guess the old saying &quot;If you<br>
don&#39;t use it, you&#39;ll lose it&quot; is true.  So anyway here goes.<br>
<br>
<br>
<br>
1.<br>
<br>
I&#39;m in the customer table and after copying the current record to a new one,<br>
I now want to move to that record with it shown on the screen (or the focus<br>
moved to it).  I can get the record # of the newly created record and do a<br>
lookup with the record #.  I&#39;ve tried that and added a display after the<br>
lookup and it doesn&#39;t change to the new record.  Here is some code.<br>
<br>
<br>
<br>
@keyT<br>
<br>
.         I&#39;m in the cust table<br>
<br>
.         I created a new customer record and saved its record number to a<br>
declared variable &quot;lnRecNum&quot;<br>
<br>
<br>
<br>
If:<br>
<br>
Then:  yi=lnRecNum<br>
<br>
<br>
<br>
If:<br>
<br>
Then: lookup cust = customer  r=yi   -n<br>
<br>
<br>
<br>
If:<br>
<br>
Then: display<br>
<br>
<br>
<br>
If:<br>
<br>
Then: End            &#39;  the @KeyT processing<br>
<br>
<br>
<br>
The record I was on when pressing the T key is still there as it did not<br>
change.<br>
<br>
<br>
<br>
<br>
<br>
2.<br>
<br>
One other thing,  I declared the variable &quot;lnRecNum&quot;, but cannot use it with<br>
the lookup statement, hence me writing it to a new variable &quot;yi&quot;.  Why<br>
cannot the declared variable be used with the lookup statement.<br>
<br>
<br>
<br>
Works: lookup cust = customer  r=yi   -n<br>
<br>
Fails: lookup cust = customer  r=lnRecNum   -n<br>
<br>
Thanks,<br>
<br>
Stanley<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20121119/03b5644c/attachment.html" target="_blank">http://mailman.celestial.com/pipermail/filepro-list/attachments/20121119/03b5644c/attachment.html</a><br>

_______________________________________________<br>
Filepro-list mailing list<br>
<a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a><br>
Subscribe/Unsubscribe/Subscription Changes<br>
<a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br>
</blockquote></div><br>