Hi,
Here´s my problem. I have a form that contains unbound textboxes, comboboxes and a button that runs query. The query criteria fields are linked to the textboxes/comboboxes on the form so the user can enter a criteria. In criteria i use -Like "*" & [textbox] & "*"- so if the textbox is left empty, it is considered as no criteria or any value. Works like a charm. But the problem begins, if the table contains fields that are linked to other tables. Field then just contains ID. Yes, i can use combobox then, but "Like" expression and wildcards will mess up results, because field actually contains just ID, a number. If you remove "Like" and wildcards, it works fine, but then the field can´t be left empty, because query won´t return any results. Anyone faced the same problem? Can someone help?
Olxx
Here´s my problem. I have a form that contains unbound textboxes, comboboxes and a button that runs query. The query criteria fields are linked to the textboxes/comboboxes on the form so the user can enter a criteria. In criteria i use -Like "*" & [textbox] & "*"- so if the textbox is left empty, it is considered as no criteria or any value. Works like a charm. But the problem begins, if the table contains fields that are linked to other tables. Field then just contains ID. Yes, i can use combobox then, but "Like" expression and wildcards will mess up results, because field actually contains just ID, a number. If you remove "Like" and wildcards, it works fine, but then the field can´t be left empty, because query won´t return any results. Anyone faced the same problem? Can someone help?
Olxx