Thanks for having a look Gene, but I don't think you've seen my code
correctly.

Clcode is a field in the Windebs table
It is the "currently" selected table (or table which is the controlsource
of the grid)
The error fires on the line that says "lcclient=clcode"





On Thu, Jan 28, 2016 at 11:57 AM, Gene Wirchenko <ge...@telus.net> wrote:

> At 12:22 2016-01-27, Sytze de Boer <sytze.k...@gmail.com> wrote:
>
>> FRIENDS !!
>> Thank you all for your comments. I appreciate it.
>>
>> I decided to post/ask my query because in the past 3 months I've also had
>> some major issues.
>> I cannot identify the cause and I'll briefly describe it here.
>>
>> I have a form with a grid. The controlsource is a free standing table.
>> (Clients table called Windebs)
>> The form has a command group with several buttons.
>> Example, "Show Transactions"
>> The click event has code such as
>> lcclient=clcode
>> select * from winhst where client=lcclient into curs temp
>>
>> I end up with an error "variable clcode not found"
>>
>
>      How do you manage that with no "clcode" in your code?
>
> It is as though the underlying table is no longer Windebs, which is nuts
>> because I did not "select" another table anywhere.
>>
>
>      In the example above, you did a select, and the current alias will be
> that of the cursor.  The cursor will have the structure of winhst, not
> windebs.
>
>      Did you open a table and forget to select 0 before doing so?  I made
> that mistake just this morning, and my code threw an error when I tried to
> close the table that got opened over.
>
> Now, I've seen similar behavior when Anti virus software is locking the
>> tables, or extremely slow network connections, but it just started
>> happening about 3 months ago, and only with "some" customers.
>> At one time I thought it was only on XP pc's but that theory is also
>> disproved.
>>
>> At this stage I'm slowly trawling through my code and changing Click
>> events
>> to
>>
>> sele windebs
>> lcclient=clcode
>> select * from winhst where client=lcclient in to curs temp
>>
>
>      Due to the chaoticness of methods being fired, it can be somewhat
> unclear what code has just executed.  I prefer to be careful and explicitly
> specify tables.  I do not trust that the alias has stayed the same over
> method firing if I have any alias changing.
>
> [snip]
>
>
> Sincerely,
>
> Gene Wirchenko
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAG1nNy_8K7M3BNksT3zgD7JVJwALDs20ZdC=mOjq=v2bovj...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to