main logo
Subject: Re: variable or field ?
Author: "Paul Newton"
Posted: 2003/10/31 06:30:00
 
View Entire Thread
New Search


A couple of thoughts on this

You could use AFIELDS to check if "Varname" is a field in the
currently selected table. Then again it could be a field in another
table open in a different work area.

IWHT that if you name memvars systematically (eg Hungarian) you could
check the first two (or three) letters of the varname to see if it
begins with lc, gn etc. But then you'd still have to make sure that
none of your field names begin with these letters

Another possibility (depending on exactly what you are doing and how
you are going about it) would be to make sure that if it is a field
that it is prefixed by the alias. Then you could check if the period
(.) is part of the varname. If so its a field, if not its a memvar
(unless you use m.varname of course)



On 31 Oct 2003 at 12:01, jsm.maurice wrote:

> I am trying to 'simulate' the controlsource property in a class based
> on a container. I have created a ControlSource property with an
> _assign method. It works great except for a point : if the value of
> the controlsource propety is a variable, I must update it with the
> equal sign; if it is a field, I must use REPLACE.
>
> I didn't find a way to detect wether 'nameofvariable' is a true
> variable or a field ...
>
> Any idea ?
>
> J. MAURICE (AT) Grenoble .DOT France.Europe UFPRC - Foxil
> unable to forget {^2001.09.11}
>
>
[excessive quoting removed by server]


 
©2003 Paul Newton
<-- Prior Message New Search Next Message -->