Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logic for an Add Button
Message
From
15/03/2002 08:30:34
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Logic for an Add Button
Miscellaneous
Thread ID:
00633342
Message ID:
00633342
Views:
44
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.
Next
Reply
Map
View

Click here to load this message in the networking platform