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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP6 - Wizard form 1

Status
Not open for further replies.

wetton

Technical User
Jun 26, 2006
42
AU
I'm using a Form generated by the Form Wizard. I've been able to change some aspects of the operations of the form using the wizbtns vcx but one that eludes me is where the code that states - 'Data has been changed. Would you like to save changes? Yes No Cancel.'

I amm using my own routine to update the underlying table and its associated 'master table' - One of a set of a related database tables.

The dialogue mentioned happens after I have edited fields on the form via my own sub form and [Exit] is clicked.

I want to disable this default action and just exit the form.

Can any one tell me how to go about this?

Thanks

PW

Can
 
IT will either be in the Form or FormSet Methods, try the most likely ThisForm.Destroy() event.



Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 
It's called from QueryUnload but (to cut a long story short) you need to look in the ResolveConflict method of the BaseForm class in wizBase.Vcx. There you'll find:
Code:
nPromptSave = MESSAGEBOX(PROMPTTOSAVE_LOC,35)

The message in PROMPTTOSAVE_LOC is #DEFINED at the head of the method.

At the risk of stating the obvious, you'd be safer to copy this class from wizBase.vcx to your own library before experimenting with it.

Geoff Franklin
 
Thanks Guys,

I have managed to achieve what I wanted so far - one thing is left.

In the SearchForm which is used in the [Find] button I can see combos ( 4 actually) 2 of which are filled with the field names from the cursor - OK so far.

However not all the fields are listed in the combo - in particular Memo fields.

I have two Memo fields on the form which are exactly where a user will want to look for a certain string.

I have looked in the search class but I can't see where the combos are filled from.

Any ideas anyone?

Thanks

PW
 

PW,

To achieve that, you will have to modify the code in the SearchForm class (in Wizbtns.VCX).

In the Init of the combo, you'll see some code that tests for field type, and disallows it if it is a memo field, general field or unknown type:

Code:
IF INLIST(aWizFList[m.i,2],"G","M","U")	&&Memo field

If you remove the "M", from that line, the memo fields will show up in the combos.

Keep in mind that the user would have to choose "contains" from the Operator combo to get any useful result.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike ,

Thanks once again - I have 'Contains' as the Deafault in the Operator combo.

Enjoy the warm weather!

PW
 
Just as an improvement to the Wizard Form concerning the move forward > move back < record buttons - it would be great if a continual click ( keeping the left button pressed ) would 'flick' through the records - from memory I think Access does this .

Anyone have any ideas for some code modifications in there?

Thanks

PW
 
Anyone have any ideas for some code modifications in there?
Add a Timer as part of the navigation container and call the appropriate code repeatedly. Start the timer on the button's MouseDown and stop it on the MouseUp. Might be nice to have some sort of delay so as it doesn't go galloping off and take the user by surprise.

Geoff Franklin
 
Many thanks Geoff - I'll give it a go.

PW
 
You might try a loop in the MouseDown event:

DO WHILE MDOWN()
* Move the record pointer
ENDDO

You'll probably actually need to put a counter of some sort, so that you only go forward even so many times through the loop.

Tamar
 

In your routine's [Exit] click events you would need to add the following code:

=tableupdate()
dodefault()

The table buffering is enabled and will not allow updating of records until you do a save.

Donnie Sauls

** Wetton wrote:

I'm using a Form generated by the Form Wizard. I've been able to change some aspects of the operations of the form using the wizbtns vcx but one that eludes me is where the code that states - 'Data has been changed. Would you like to save changes? Yes No Cancel.'

I amm using my own routine to update the underlying table and its associated 'master table' - One of a set of a related database tables.

The dialogue mentioned happens after I have edited fields on the form via my own sub form and [Exit] is clicked.

I want to disable this default action and just exit the form.

Can any one tell me how to go about this?

Thanks

PW

Can
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top