I created something similar a while back, what I did was create a class that was basically a container with:
- A dropdown list for the operators
- A textbox to enter the search value
- A property to indicate the data type for the value
- A property to indicate the name of the field to be searched
- A method that returned the search expression as a string, as in:
ClientName = "PEDRO SILVA"
There was a method in the search form that looped through the objects of this class calling that method and creating a compound search expression.
Once I had the resulting expression I used macro expansion to execute the query, I hope I was clear enough.
>Hi
>
>I have one table with 10 fields .
>
>The end user want makes a lot of queries
>
>Example : end user want see
>field1 > 50 .AND. field2 < 20 .AND. field3 = "NEW YORK"
>
>perhaps end user wnt see
>
>field1 = 50 .AND. field2 > 200 .AND. field3 = "BOSTON"
>
>
>i want make one form , with all fields in my table .
>
>So end user can select fields , and select operators ( < > = .AND. .OR. ) , and select values .
>
>Do you understand me ?
>
>Can you help me ?
>
>Thanks
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