H
hughess7
Hi all
I have a search facility on a form in my database. When the form is opened
it displays all the fields used from a particular table ([DealerClaimCheck])
with all records displayed (read-only). They will only search one field at a
time, no requirement for multi-criteria as yet at least. I have coded it so
that if a user double-clicks in any of the fields, that fields value will be
stored as the search criteria in an unbound text box ([txtSearch]) and the
control name is stored in an unbound combo box ([]). They can also select the
field to search manually from the combo box and enter the criteria in the
text box. I now need to create the filter code and I have a question ... how
can I use the one text box to be able to accept entries of any data type? ie
I know if they enter a date it will need formatting for jet to understand it
and text requires quotes etc etc.
I did find an excellent search utility in these forums which does what i
want to achieve, but unfortunately it isn't ideal for an end user to use and
it is too complicated for me to understand exactly how it works! But it did
seem to interpret the data type correctly from an unbound text box.
I know I can have seperate text boxes for each data type but is it possible
to perform any search from just the one? I don't want to limit which fields
can be filtered on either.
Thanks in advance for any help.
I have a search facility on a form in my database. When the form is opened
it displays all the fields used from a particular table ([DealerClaimCheck])
with all records displayed (read-only). They will only search one field at a
time, no requirement for multi-criteria as yet at least. I have coded it so
that if a user double-clicks in any of the fields, that fields value will be
stored as the search criteria in an unbound text box ([txtSearch]) and the
control name is stored in an unbound combo box ([]). They can also select the
field to search manually from the combo box and enter the criteria in the
text box. I now need to create the filter code and I have a question ... how
can I use the one text box to be able to accept entries of any data type? ie
I know if they enter a date it will need formatting for jet to understand it
and text requires quotes etc etc.
I did find an excellent search utility in these forums which does what i
want to achieve, but unfortunately it isn't ideal for an end user to use and
it is too complicated for me to understand exactly how it works! But it did
seem to interpret the data type correctly from an unbound text box.
I know I can have seperate text boxes for each data type but is it possible
to perform any search from just the one? I don't want to limit which fields
can be filtered on either.
Thanks in advance for any help.