Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
THISFORM can only be used within a method
Message
 
 
À
12/01/2007 12:50:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01185055
Message ID:
01185150
Vues:
14
>>>BTW guys. Sorry, but the code is not in the form's .Init(), but in a method that fires when the Operator is changed (i.e. getting all the bus routes that apply to a part. bus operator).
>>>
>>>I must be going snow-blind
>>
>>What if you move SET FILTER command (if you really need to use it) outside the WITH ENDWITH ?
>
>Well this is the thing now. I've replace the thisform.dStartDate with ldDate in this code, now I'm back to square one in that when I drop ythe combo (1st time) I get message that ldDate not known. Trouble is that code is supposed to fire when I change the operator (also via combo); this isn't happening when I drop the Route combo.
>
>The filter assignment is now simply:
>
> lcFilter	 = "OPERATOR = " + ALLTRIM( STR( lnOperator)) + " and " + ;
>  		      "END_DATE >= ldDate or EMPTY( END_DATE)"
>
>
>Can't figure why this fires at this point cos, as I said, I'm not changing the operator.

Because you have to put it as a constant, not the ldDate variable as you show here. See my other reply to Borislav (cc to you) a sec. ago.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform