lookup field
Kenneth Brody
kenbrody at spamcop.net
Mon Mar 14 09:54:21 PDT 2011
On 3/13/2011 5:31 PM, Rkreiss at verizon.net] wrote:
> Ken,
>
> 1. From phone, no cut and paste.
Noted.
However, that does leave open the possibility of typos in the code you post,
as was seen in the two typos in the "mid()" example you gave.
> 2. Posted: Create a new record in another file pertaining only to those records with IsNewYork="Y".
And how, exactly, do you prevent this from happening when IsNewYork is not "Y"?
Again, the single line of code you posted will only set IsNewYork to "Y" if
the first 2 characters of foobar(34) are "ny".
So, the possibilities I see are:
1) Something else in your code can also set IsNewYork.
2) The code to create the new record can be executed even if IsNewYork is
not "Y".
3) You are mistaken in your belief that any records are being erroneously
created in the first place.
Have you tried my message box suggestion, below?
[...]
>> If: foobar(34)="Ny"
>> Then: IsNewYork="Y"
>
> That will set IsNewYork to "Y" if the first two characters of foobar(34) are
> "ny".
[...]
> The code above would not set IsNewYork to "Y" unless the first two
> characters of foobar(34) were "ny".
>
> Whether or not something else in the processing (of which you've only given
> us the single line above) sets IsNewYork, or whether or not something else
> in the processing "posts records" despite IsNewYork not being set, we have
> no way of knowing.
>
> Why not add a message box at the point where you will actually post a
> record, showing the contents of IsNewYork and foobar(34)? (This, of course,
> assumes that nothing else in processing will change what record the foobar
> lookup points to, nor does it change field 34 after executing the above line.)
--
Kenneth Brody
More information about the Filepro-list
mailing list