All,
I have a form that I'm in the midst of converting from FPW2.6 to VFP 7. One control is a ListBox that has code along these lines in the Valid:
SELECT CTINFO
SEEK M.LISTVALUE
IF FOUND()
SCATTER MEMVAR MEMO
ENDIF
The basic premis of this code is, when the value in the list box changes, it locates the value in a lookup Code Table. If it finds it, the SCATTER MEMVAR MEMO "Automatically" replaces the values of about 15 fields. This techinque works great, and was very common in the 2.x days, as I'm sure many of you are aware.
Now, to 2002, and VFP7. This doesn't really work in my converted form. There are no "Memvar" equivelents to these fields. (Since, everything now is an Object, and has to be set with:
"ThisForm.txtInfo.Value = CTINFO.INFO"
What I am trying to avoid, is having to creat a great huge routine, which specifies every field in a table. This is a big problem, because if the name of a field changes, I have to go to the form, and make changes as well. With the "Scatter" method, they would be automatically assigned, regardless.
The second part of this problem is, some fields are displayed, but others are not. I still want all the values to be "Updated", so that when I issue a "TableUpdate()" command to save my changes, the values from the CTINFO table will be reflected.
Is there some VFP super-cool trick to this, or am I left to forceibly hard code every "ThisForm.txtObject.Value =" statement for every field & variable I want to update?
Thanks,
-Scott
s-) Please let me know if this has helped s-)
I have a form that I'm in the midst of converting from FPW2.6 to VFP 7. One control is a ListBox that has code along these lines in the Valid:
SELECT CTINFO
SEEK M.LISTVALUE
IF FOUND()
SCATTER MEMVAR MEMO
ENDIF
The basic premis of this code is, when the value in the list box changes, it locates the value in a lookup Code Table. If it finds it, the SCATTER MEMVAR MEMO "Automatically" replaces the values of about 15 fields. This techinque works great, and was very common in the 2.x days, as I'm sure many of you are aware.
Now, to 2002, and VFP7. This doesn't really work in my converted form. There are no "Memvar" equivelents to these fields. (Since, everything now is an Object, and has to be set with:
"ThisForm.txtInfo.Value = CTINFO.INFO"
What I am trying to avoid, is having to creat a great huge routine, which specifies every field in a table. This is a big problem, because if the name of a field changes, I have to go to the form, and make changes as well. With the "Scatter" method, they would be automatically assigned, regardless.
The second part of this problem is, some fields are displayed, but others are not. I still want all the values to be "Updated", so that when I issue a "TableUpdate()" command to save my changes, the values from the CTINFO table will be reflected.
Is there some VFP super-cool trick to this, or am I left to forceibly hard code every "ThisForm.txtObject.Value =" statement for every field & variable I want to update?
Thanks,
-Scott
s-) Please let me know if this has helped s-)