Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to filter record in buffering mode
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00489764
Message ID:
00492666
Vues:
11
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform