Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Coding, syntax & commands
Hi Randy
Many people get bitten by this. I believe its related to how we think the code reads.
Perhaps people think REPLACE inv_hdr.invno WITH ThisForm.Nextinv means
put the value THISFORM.NextInv into the field invno in inv_hdr.
The closest line of code to the above English would be
replace invno with THISFORM.NextInv in inv_hdr.
The only time you'd absolutely have to write the code the way you did is if there were one or more related tables and you wanted to use a single replace command to update fields in different aliases.
>Hi, VFP7 user. I tried to run the following line of code. I placed wait windows before & after to debug. Here is what I get:
>
>WAIT WINDOW thisform.nextinv && returns 'S1123-4' (character string)
>REPLACE inv_hdr.invno WITH ThisForm.Nextinv && assigns invoice #
>WAIT WINDOW inv_hdr.invno && returns ''
>
>I am using buffered data. My values and fields are all character. What am I doing wrong (property value will not transfer to field)?
>
>Thanks, Randy
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only