>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
thisform.IsSearched = .t.
In Page Activate Event
IF NOT thisform.IsSearched
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.