See if this helps u in ne way..
-----------------------------------------
IF USED(lcTableName) && check if table is already in use
SELECT lcTableName && if yes then select the workarea
ELSE
USE lcTableName && else open the table
ENDIF
APPEND BLANK
REPLACE Filed WITH Value && OR wtev u would like to do
-------------------------------------------
Please do let me know if you need any more help !!!
You can do it one of these two ways. The first is closest to Fox 2.x, but doesn't employ all the 'new' features of VFP buffering. Your controls on the form (text boxes, bombos, radio buttons and so on) all have control sources. Initialize variables with the same names as the table fields. You can use SCATTER MEMVAR BLANK in the form's Load event or the startup .prg. Set these to variables in the control source of the control. Add a control to the form. Right-click the control and select 'Properties'. Then scroll down to control source and input m.MyField1, whatever the name of the field you will be replacing. Repeat for all the controls you are using.
Now in the 'New' button, you will put another SCATTER MEMVAR BLANK. Edit the data, then in the 'Save' button put in either:
INSERT INTO MyTable FROM MEMVAR
-or-
APPEND BLANK
REPLACE MyField1 WITH m.MyField1
REPLACE MyField2 WITH m.MyField2
.
.
.
and so on.
The best way though is to check into buffering. Set the controls to the corresponding fields of the table, and let VFP do the work for you. It is a little in-depth to get into here since you know nothing about it, but if you look at the help files you will get some ideas.
Dave S.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.