Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WIZBTNS- Where to put my function before user press SAVE button 1

Status
Not open for further replies.

milosv

Vendor
Nov 6, 2003
27
SI
I have subclass Wzbtns.vcx and wish include function to incremental record number just before user press save button. When user edit record i wish to run another function before he press SAVE. Where and how must I put my function.
Please help.
 
milosv

You could in your save button, put :

First line:
**Do whatever you need to do here
DODEAULT() && This wiill do the save function of the parent class

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi

In the VCR buttons.. add buttons... click event
add code following way..
WizBtns.AddButton.Click event
*****************************
IF THIS.Parent.EditMode
** You are already editing..
** you are going to Save now..
** SO do the incremental code here.
ELSE
** Add button has been pressed...
** You are about to change to new record addition mode
ENDIF
DODEFAULT()


If you are going to edit mode or revert mode..
WizBtns.EditButton.Click event
*****************************
IF THIS.Parent.EditMode
** You are going to edit a record.
** SO do whatever to start editing.
ELSE
** Yoy are alredy in edit mode..
** You have clicked to revert the editing
** Do whatever...
ENDIF
DODEFAULT()

:)

____________________________________________
ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Ramani,
Thanks this solve my problem.
A star for yu!

Milosv :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top