Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 To: Brian Walder
  Where is Brian Walder?
 Minehead
 United Kingdom
 Brian Walder
 Tags
Subject: RE: Accessing the Save button in a wizard cr
Thread ID: 143204 Message ID: 143231 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Sunday, August 26, 2007 2:25:53 PM         
   


> Hi All
>
> Having created a form via the wizard, and being restricted to only using records from two tables, I have subsequently added three or four more tables to the form. However the functionality of the wizard buttons (Top, Bottom, Save, Add, Edit etc etc) only related to the original two tables. I then managed to get all relevant fields to become enabled by adding code into the Edit or Add buttons, however I cannot find any way of adding code to the Save button, which only appears to be enabled when in Edit or Add mode.
>
> Can anyone point me towards where I should be adding code to suit my adapted form ??
> Thanks in advance.

I would not recommend to use the wizard to create your forms unless you understand what is going on in the background. But you will notice in the add button there is no code, because the code is locate in the parent class (wizbtns). Adn if you find that code (in edit mode, click on the view parent class code ), you will find this code
IF THIS.Parent.EditMode
	THIS.Parent.UpdateRows()
ELSE
	IF !THIS.Parent.AddRec()
		RETURN
	ENDIF
ENDIF

THIS.Parent.EditMode = !THIS.Parent.EditMode
THIS.Parent.AddMode = THIS.Parent.EditMode
THIS.Parent.TopFile = .F.
THIS.Parent.ButtonRefresh()
THIS.Parent.NavRefresh()


The Save function is UpdateRows() in the parent class.


Mike Gagnon


ENTIRE THREAD

Accessing the Save button in a wizard cr Posted by Brian Walder @ 8/26/2007 1:12:13 AM
RE: Accessing the Save button in a wizard cr Posted by Mike Gagnon @ 8/26/2007 2:25:53 PM
RE: Accessing the Save button in a wizard cr Posted by Ken Murphy @ 8/26/2007 3:34:26 PM