Information générale
Catégorie:
Codage, syntaxe et commandes
>Hi Steve, I was using the SET FILTER command
>
>SELECT tblTrans
>SET FILTER TO flddate >= dtFrom .AND. flddate <= dtTo
>GO TOP
>
>in the Init method of the form. The date range was being entered into two textboxs in a previous form and passed to this form
>
>P.S. I also tried setting the data enviornment-cursor's filter property
I'm going to guess that because the code was in the Init event of the form, that might be why it doesn't take. The form kinda exists in the netherworld until the .Init event completes. We've solved that dilemma by creating an .InitialSetup method that is blank in the form base class but populated with necessary code at the sub-classed form level. This method is automatically run through via the application object's .DoForm() method so we know it's always run. We limit any code in the .Init of all forms. This also lets the form display faster.
Try putting your filter code elsewhere somehow and running it after the .Init event of the form fires.
Steve
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement