This is right, but your syntax is not correct, you don't have to put the
name of your data file ( RECETAS.REMES )
HFilter( "RECETAS" , "CLAVE" ,"REMES = '" + nMes + "' and REANO = '"+ nAno +
"'" )
And remember the single quote is used for the TEXT not for NUMBERS !!!!
So your line code must be :
HFilter( "RECETAS" , "CLAVE" ,"REMES = " + nMes + " and REANO = "+ nAno )
I also recommend you to use the tostring function ( you will control the
format of your numbers in the filter string ).
"Gill Davis" <gill@postrans.com> a écrit dans le message news:
3B347DB1.F6296D52@postrans.com...
Hi MAriano
Try
HFilter( "RECETAS" , "CLAVE" ,"RECETAS.REMES = '" + nMes + "' and
RECETAS.REANO = '"
+ nAno + "'" )
HReadFirst( "RECETAS" , "CLAVE" )
HFilter only works on a key value, and you can't change that value
beteen the filter and the browse.
I use a filtered browse for better results. See the manual under Browse.
Gill
Mariano Saul wrote:
Can some one give mi a hint on how to make HFilter's second option
Hfilter
with a condition.
nMes is int
nAno is int
nMes = 2
nAno = 2001
HFilter( "RECETAS" , "RECETAS.REMES = '" + nMes + "' and RECETAS.REANO =
'"
+ nAno + "'" )
HReadFirst( "RECETAS" , "CLAVE" )
This works erratically, and it's driving me nuts.
I DON'T have an index on REMES nor on REANIO.
Thx