Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
THISFORM can only be used within a method
Message
From
12/01/2007 13:03:32
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01185055
Message ID:
01185157
Views:
17
lcFilter = "OPERATOR = " + ALLTRIM( STR( lnOperator)) + " and " + ;
  	     "(END_DATE >= CTOD('"+DTOC(ldDate)+"') or EMPTY( END_DATE))"
or lddate will have to be in scope everywhere. Of course, using this code, you have to reset lcfilter everytime lddate changes or lnoperator changes.


>>>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.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform