Sorry, I hit send a bit too early on that last one...
Anyway, PARAMETERS() isn't reliable...It can be interrupted.
I assume that you mean that the RETURN .F. is executed when you *think* that you have actually passed parameters...If that is the case, then PCOUNT() may well solve your problem. If I misunderstand, please repost. (But do switch to PCOUNT() :-)
>I have this code.When SQL finishes nothing happens.My listbox stays empty.I check it with the debugger and the two passed parameters have the correct values.What´s wrong ?
>
>
>LPARAMETERS tcPeriodo, tcAño
>
>IF PARAMETERS() < 1
> RETURN .F.
>ENDIF
>
>
>SELECT * ;
> FROM mytable a ;
> WHERE a.field1 = tcperiodo ;
> AND a.field2 = tcaño ;
> INTO CURSOR c_names
>
>thisform.lstConsultas.Requery()
>
>IF _tally > 0
> thisform.lstConsultas.ListIndex = 1
>ENDIF
>
>Note : I put the rowsource of the listbox to cnames and rowsourcetype to Alias.
>
>thanks in advance.
>
>
>
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only