is there a way i can use substitution variables in access 2007, i wrote a query that returns rows which have a word okeu in them but i want to use substitution variables so that i can retrieve any word i want and if the word i want is not there i want to pop a message saying word not there its easier to do it in oracle sqlplus but how can i apply it in access using sql queries??any ideas,thanks in advance
this is my sql i made in access
SELECT MENU.NAME_REC, MENU.C_REC, AUTO.C_GROUP
FROM MENU, AUTO
WHERE (((MENU.NAME_REC)="okeu"));
You can, it’s called a Parameter Query. There are different ways to implement this – sometimes you may simply want to prompt for the search term (as in the example in the article). Other times, particularly if you are building a form to collect information from the end-user, you’ll want to have the parameter refer to a control on the form instead of prompting for the value(s) when the query is invoked. Without knowing your exact implementation goals it’s difficult to recommend the best strategy to use for your circumstances, but this at least should get you started.