A
amitbadgi
Hi guys, I am cuurently usind MS Access to create a form where in you
enter a business id and click search and teh corresponding details of
that Business Id shows up, I have wriiten a query and added it as a
macro to the search button. Now my problem is that, I have 4 different
cities and each city has 2 tables, now this is the query i had written
for one city which consists of 2 tables
SELECT dbo_businessNC.bus_name, dbo_businessNC.adrs1,
dbo_businessNC.adrs2,
dbo_businessNC.city, dbo_businessNC.state, dbo_businessNC.zip,
dbo_businessNC.phone, dbo_licenseNC.license
FROM dbo_businessNC, dbo_licenseNC
WHERE (((dbo_businessNC.bus_id)=[Forms].[Form1].[text2] And
(dbo_businessNC.bus_id)=[dbo_licenseNC].[bus_id]));
Now I want to know how to write the query so that I can include all the
cities in this form ,and so that if a user enters a business id say
from city A, he would get teh details of that ID from city A and
exclude other cities, and say if he enters business ID from city B, he
would get the details from B, and exclude the rest. Thanks in advance.
enter a business id and click search and teh corresponding details of
that Business Id shows up, I have wriiten a query and added it as a
macro to the search button. Now my problem is that, I have 4 different
cities and each city has 2 tables, now this is the query i had written
for one city which consists of 2 tables
SELECT dbo_businessNC.bus_name, dbo_businessNC.adrs1,
dbo_businessNC.adrs2,
dbo_businessNC.city, dbo_businessNC.state, dbo_businessNC.zip,
dbo_businessNC.phone, dbo_licenseNC.license
FROM dbo_businessNC, dbo_licenseNC
WHERE (((dbo_businessNC.bus_id)=[Forms].[Form1].[text2] And
(dbo_businessNC.bus_id)=[dbo_licenseNC].[bus_id]));
Now I want to know how to write the query so that I can include all the
cities in this form ,and so that if a user enters a business id say
from city A, he would get teh details of that ID from city A and
exclude other cities, and say if he enters business ID from city B, he
would get the details from B, and exclude the rest. Thanks in advance.