helpmeplease
11-02-2001, 03:29 PM
How do I create an OR SQL statement or an OR criterea so that the user knows that they have the OR option instead of inputting values in the first text box that shows up?
|
View Full Version : SQL OR statements (please help, i'm so frustrated) helpmeplease 11-02-2001, 03:29 PM How do I create an OR SQL statement or an OR criterea so that the user knows that they have the OR option instead of inputting values in the first text box that shows up? jwindon 11-02-2001, 03:32 PM You mean you are putting brackets in the query grid? I can help you go another route. If you're there. jwindon 11-02-2001, 03:36 PM Step One: Create an unbound form. Step Two: Create two unbound text boxes. Step Three: Edit your labels to reflect what the choice to the right will represent. Step4: Set your criteria in the query grid to be: =Forms!TheUnboundFormNameHere!FirstUnboundControlN ameHere and the same thing on the OR line. =Forms!TheUnboundFormNameHere!SecondUnboundControl NameHere PS. To save you some heartache. The names of those controls will probably be something like Text1 and Text2 when you create them. The name of a control can be found on its property sheet under the Other tab. (Right click on control in design view of the form) [This message has been edited by jwindon (edited 11-02-2001).] helpmeplease 11-02-2001, 03:37 PM Kind of, I'm just trying to make it so that when i'm trying to query something, it gives me two choices, either put a number in, or put a name in, but I don't know how to let the user know that they have that choice. If they see it now, they think it's just one box they have to input a value into since the second box pops up after hitting ok to the first one. Do u understand what I mean? If so, could u pleeeeeez help me! Thanks jwindon 11-02-2001, 03:42 PM Once you have that all in place, go back to your form and use the Command Button Wizard to create a button on your form that runs that query. That's it! helpmeplease 11-02-2001, 03:56 PM The thing is, I want this to work on a query, not a form. What should I do? jwindon 11-02-2001, 04:08 PM Tell me the process of how you want the query to run. What does the user do before hand? jwindon 11-02-2001, 04:25 PM What I have done above is RUN THE QUERY. That happens when you press the command button. Same thing as double clicking on the query in the database window. This allows you more options. You will see the benefit as you create more queries. Expecially when you want to look for data that matches data on a form. What is the user doing when they want to run this query? Are they on a switchboard? Are they double clicking the query? |