Subject Re: Variable used for the field in code?
From Ken Mayer <>
Date Thu, 16 Nov 2023 09:25:22 -0800
Newsgroups dbase.getting-started

On 11/16/2023 8:52 AM, charlie wrote:
> Is it possible to do something like below?  grd is a variable that I am trying to insert in the field code??
> form.spinboxestv1.value = val(co.fields["'grd'"].value)
> If it is possible, how will you do this?  The code i tried fails.

This needs to be a string, so use the plus sign to concatenate things,
try this:

form.spinboxestv1.value = val(co.fields["+grd+"].value)

(About to take my wife to the doctor, so no testing time ... can't
guarantee it)


*Ken Mayer*
Ken's dBASE Page:
The dUFLP:
dBASE Books:
dBASE Tutorial:
dBASE Web Tutorial:
dBASE DOS to Windows Tutorial: