General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
I apologize for causing inconvenience to you because I want to make forms with buffering mode in VFP.
I'm trying to test my forms as your advice but it can't work exactly.
My code is:
SET EXAC ON
SET EXCL OFF
IF !FILE("tb1.dbf")
CREATE TABLE tb1 (id c(1),desc C(30))
INDEX ON id TAG id
ELSE
USE tb1
ENDIF
SET MULTILOCKS ON
=CURSORSETPROP('buff', 5) && anything > 1
SET FILTER TO id=="A"
PUBLIC oform
oform = CREATEOBJECT('form1')
oform.SHOW()
DEFINE CLASS form1 AS FORM
AUTOCENTER = .T.
HEIGHT = 240
WIDTH = 340
CAPTION = "Form1"
ADD OBJECT grid1 AS GRID WITH ;
TOP = 6,;
LEFT = 10, ;
HEIGHT = 180,;
RECORDSOURCE = "tb1", ;
RECORDSOURCETYPE = 1, ;
ALLOWADDNEW = .T.,;
DELETEMARK = .F.
ADD OBJECT command1 AS COMMANDBUTTON WITH ;
TOP = 200, ;
LEFT = 50, ;
HEIGHT = 27, ;
WIDTH = 84, ;
CAPTION = "Add Record"
ADD OBJECT command2 AS COMMANDBUTTON WITH ;
TOP = 200, ;
LEFT = 220, ;
HEIGHT = 27, ;
WIDTH = 84, ;
CAPTION = "Save Record"
PROCEDURE UNLOAD
USE IN tb1
ENDPROC
PROCEDURE command1.CLICK
APPEND BLANK
THISFORM.grid1.SETFOCUS
THISFORM.REFRESH()
ENDPROC
PROCEDURE command2.CLICK
=TABLEUPDATE(.T.)
THISFORM.REFRESH()
ENDPROC
ENDDEFINE
*---------*
After that, I open 2 session of VFP and run it with different filter condition.
Thanks for your advice
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