Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enabling Controls event
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01035023
Message ID:
01035028
Views:
16
>I have a pageframe with 5 pages. On page 2 the user can basically enter information from a form which is bound to a table. I have a number of buttons which allows the user to create new, edit, copy, print etc. In the activate event on page 2 I basically set the controls to f or T. When the user clicks edit then the controls are enabled but also a button is enabled to allow the user to search for some information which can be inserted into the form. the problem is when I release this form all the controls are changed as the page is activated again.
>
>Im just wandering what is the best event to put this code in so that when I release my search form the controls are in the same state. At the moment when I click edit only save and undo are enabled. When I search and subsequently close the search form the save and undo buttons are disabled because page2 is activated again.
>
>Any help would be greatly appreciated

You can add a property in the Form that shows you if you was in Search mode. Something like
*** Search Button Click event
thisform.IsSearched = .t.

*** DO Search Here
In Page Activate Event
IF NOT thisform.IsSearched
   *** Do normal Activate Event 
ENDIF
thisform.IsSearched = .f.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform