Article ID: 187274
Article Last Modified on 6/6/2003
PROCEDURE Refresh
IF THISFORM.chkRef.Value
DODEFAULT()
WAIT WINDOW THIS.Value NOWAIT
ENDIF
RETURN
ENDPROC
CLOSE ALL
CREATE CURSOR Test (Field1 M, Field2 C(12), Key N(2))
INSERT INTO Test (Field1, Field2, Key) VALUES ;
("This is some text.","More", 1)
INSERT INTO Test (Field1, Field2, Key) VALUES ("", "Other", 2)
CREATE DATABASE Test
CREATE SQL VIEW "TestView" AS SELECT * FROM Test WHERE Key = ?m.Key
Key = 1
USE TestView
PUBLIC ox
ox=CREATEOBJECT("frmTest")
ox.Visible = .T.
RETURN
DEFINE CLASS FrmTest AS FORM
ADD OBJECT edtField1 AS edtField1
ADD OBJECT txtField2 AS txtField2
ADD OBJECT cmdButton AS cmdButton
ADD OBJECT chkRef AS chkRef
ENDDEFINE
DEFINE CLASS chkRef AS CheckBox
Top = 190
Width = 200
Left = 20
Caption = "Refer to the Value in the Refresh"
Value = .F.
ENDDEFINE
DEFINE CLASS cmdButton AS CommandButton
Top = 20
Height = 30
Left = 200
Caption = "Another Record"
PROCEDURE Click
Key = TestView.Key + 1
IF m.Key > RECCOUNT("Test")
Key = 1
ENDIF
=REQUERY("TestView")
THISFORM.Refresh()
RETURN
ENDPROC
ENDDEFINE
DEFINE CLASS txtField2 AS TextBox
Top = 20
Height = 30
Left = 20
ControlSource = "TestView.Field2"
ENDDEFINE
DEFINE CLASS edtField1 AS EditBox
Top = 100
Left = 20
ControlSource = "TestView.Field1"
PROCEDURE Refresh
IF THISFORM.chkRef.Value
WAIT WINDOW THIS.Value NOWAIT
ENDIF
RETURN
ENDPROC
ENDDEFINE
Additional query words: kbDSupport KBDSE crash hang gpf kbVFp500bug
Keywords: kbbug kbpending KB187274