LeonelSanchezJr
Programmer
Here is my problem. I have a program in VFP6 which imports data from one VFP table to another. The source table and the target table usually have the same fields. Once in a while the source table may have a new field.
The program works fine when the fields from the source table are mapped to the same fields from the target table.
However, in my dilemna I am mapping the fields as such:
SOURCE TARGET
Tel Tel
Lname Fname
Fname Lname
Addr Lname
Only Tel and Lname (both target fields) are being updated with the appropriate data. The Fname field is being populated with the Fname data and the Addr field is being populated with the Addr data.
Here is a snippit of the code:
For gcount = 1 to This.Parent.List3.listcount
srcfield = This.Page8.List3.list(gcount,1) && source
trgfield = This.Page8.List3.list(gcount,2) && target
m.&srcfield = custqry.&srcfield
m.&trgfield = m.&srcfield
Select TargetTable
For _nx = 1 to fcount()
sfield = "m."+field(_nx)
tfield = field(_nx)
Select Repres
Gather Memvar
EndFor Thanks,
Leo ;-)
The program works fine when the fields from the source table are mapped to the same fields from the target table.
However, in my dilemna I am mapping the fields as such:
SOURCE TARGET
Tel Tel
Lname Fname
Fname Lname
Addr Lname
Only Tel and Lname (both target fields) are being updated with the appropriate data. The Fname field is being populated with the Fname data and the Addr field is being populated with the Addr data.
Here is a snippit of the code:
For gcount = 1 to This.Parent.List3.listcount
srcfield = This.Page8.List3.list(gcount,1) && source
trgfield = This.Page8.List3.list(gcount,2) && target
m.&srcfield = custqry.&srcfield
m.&trgfield = m.&srcfield
Select TargetTable
For _nx = 1 to fcount()
sfield = "m."+field(_nx)
tfield = field(_nx)
Select Repres
Gather Memvar
EndFor Thanks,
Leo ;-)