Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form designer
Message
 
À
17/06/1997 13:31:36
Ying Wang
New York State Health Dept
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00036648
Message ID:
00036677
Vues:
30
>>>I created a form, a data entry screen, for entering survey data. It has a few pages. When I tried to set a control to skip pages, say go to page 6 from page 2, my program freezed. I do not know how to fix this problem.
>>>
>>I don't completely understand what you mean *set a control to skip pages*,
>>but if you say, have a button on Page 2 with the code in Click event:
>>
>>this.parent.parent.ActivePage = 6
>>
>>it should work.
>>
>>Nick
>
>
>Thanks a lot, Nick. I tried your code on page2 in click event and got a error message saying 'avtivepage not found'. Let me explain more about my problem.
>In page 2 I have a screen somehting like this:
>
> Have you ever hear of radon? a. Yes O
> b. No O
>
>
>Yes/no is a option group. If the YES box is checked it should go to page 3, and if the NO box is checked it should go to page 6.

Probably you have the problem with object referencing. Activepage is the property of Pageframe.

If you have Optiongroup on page 2
you put in Option1.Click()

this.parent.parent.parent.ActivePage = 3

and in Option2.Click()

this.parent.parent.parent.ActivePage = 6


You can also this code in InteractiveChange event:

DO CASE
CASE this.Value = 1 && Yes is checked
this.parent.parent.ActivePage = 3
CASE this.Value = 2 && No is checked
this.parent.parent.ActivePage = 6
ENDCASE

but in your case better to use the Click event in Option1... etc.
because, for example, Option1 is default option and if you click on it
there is no change for OptionGroup.Value.

I sent you the sample form RADON.SCX by E-mail.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform