Thanks for your code Excel Fox.
strSQL = "Select Employee From MyTable WHERE LOCATION IN ('London','Boston')"
Here, London, Boston etc is not the Location name in MyTable. It will be the database name.
i.e. Suppose i have a database name London, Boston , newyork etc
If i am getting the values i.e. Employee name and Employee num from the VBA Form and i click submit
It should run a dynamic query based on the values entered in the form it should run as below,
Select Employee_name, Employee_num from London where Employee_num = ' ?? '
If the Employee_num = vba form value then it should say Employee is available in London if not it should say Employee is not available in London
... The above needs to run for rest of all the databases using different datasources and need to collectively say" The Employee num is available London, Newyork"




Reply With Quote

Bookmarks