Subject Variable used for the field in code?
From charlie <tm@tc.com>
Date Sun, 19 Nov 2023 02:43:13 -0500
Newsgroups dbase.getting-started

["&grd."] does work!!  I must have had a comma instead of a period before.  Thanks again!

charlie Wrote:

> Hi Ken..  Just saw this.  It is a form which I am trying to do this in.  I tried the macro and dot but that didn't work either.  Although it takes up more space, I was able to get this to work with a elseif.
>
> Ken Mayer Wrote:
>
> > On 11/16/2023 10:58 AM, charlie wrote:
> > > tHANKS kEN..  i HOPE YOUR WIFE IS OK.
> > >
> > > I couldn't get it to work but used endif statements instead which does work.  But it does take a lot if text.
> > >
> >
> > Thanks, my wife is having fun with her eye (cataract surgery, lens that
> > was put in three years ago is becoming detached ... sheesh). More
> > surgery in the future, fun.
> >
> > Okay. Well, let me take a look. I know it should be doable ...
> >
> > The biggest issue is that as soon as you open the form in the form
> > designer, any memory variables will be evaluated, and changed to their
> > actual values. Is this something you are trying to do in a form, or in a
> > program?
> >
> > Try changing the code to use the following -- it's using macro expansion
> > to put the fieldname into the location (note you need the ampersand (&)
> > and dot (.) characters there):
> >
> > form.spinboxestv1.value = val(co.fields["&grd."].value)
> >
> > Ken
> >
> > --
> > *Ken Mayer*
> > Ken's dBASE Page: http://www.goldenstag.net/dbase
> > The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> > dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
> > dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
> > dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
> > dBASE DOS to Windows Tutorial:
> > http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm
> >
>