Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Logic for an Add Button
As a FP2.6 DOS programmer converting to VFP6.0 still struggling with understanding the code found in \wizards\wizstyle.vcx. So far I have been able to create the top, bottom, next, edit and delete buttons. Now need to code the add and Find button logic.
Not able to figure out how to blank out the fields on the form. I assume on the click code that part of the code could look like this:
IF THIS.Caption = 'Add'
THIS.Caption = 'Save'
THISFORM.cmdNext1.enabled = .F.
THISFORM.cmdPrev1.enabled = .F.
THISFORM.cmdTop1.enabled = .F.
THISFORM.cmdBottom1.enabled = .F.
THISFORM.cmdedit1.enabled = .F.
THISFORM.cmddelete1.enabled = .F.
THISFORM.allowedits = .T.
THISFORM.REFRESH()
ELSE
IF MESSAGEBOX('OK To Save',4+32+256)= 7
=TableRevert()
ELSE
=TableUpdate()
ENDIF
THIS.Caption = 'Add'
THISFORM.cmdNext1.enabled = .T.
THISFORM.cmdPrev1.enabled = .T.
THISFORM.cmdTop1.enabled = .T.
THISFORM.cmdBottom1.enabled = .T.
THISFORM.cmdEdit1.enabled = .T.
THISFORM.cmdDelete1.enabled = .T.
THISFORM.allowedits = .F.
THISFORM.REFRESH()
ENDIF
Could someone help me fill in the blanks? Also would appreciate a tip on how to code a Find Button.
Thanks in advance for any assistance.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement