Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Nadya,
I finally got this to work, but I think it was mostly because I was calling a ThisForm.Refresh in the wrong place. I'm not sure why that made a difference, but it did. I used your suggestions as well, but had a couple followup questions...
>First of all, don't put this code in Valid, put it in Click event of the button.
I've heard that before, but why? Does it have to do with when events are triggered? What should go in the Valid if we can use the Click instead? I know developers who insist that it should be the other way around, but they don't seem to know why.
>You also don't need to call page activate and page setfocus() methods. In each page Activate method put this code: this.Activate (e.g. each time page is activated, it's refreshed).
My problem here was that I needed to be at a specific field depending on the mode of the form (ie, Edit, Add, Cancel, etc.) and be able to return to whereever I came from on the form. The SetFocus call works fine in the command button Click on the origin page, but is it better to have it in the Activate of the destination page instead with a Case statement to handle the conditions?
>Finally, I have a habit to avoid macros, if it's not necessary. In this particular case you can use:
>loPage=evaluate("thisform.t48_page_frame1."+m.cLastPage)
>loPage.Activate()
I've heard this someplace before also... Do you know why the Eval is more stable?
Thank you for your help! Renoir
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement