I am trying to create a db for service providers by county. I'm relatively
new to db programming, but I have done quite a bit of programming ranging
from the old basic days up to doing some programming in the HotDocs
software. I've kind of accomplished my goal in access, but I'm not quite
there yet and figure I've really screwed something up.
The db consists of 5 tables I believe. T1 is the main contact info, with an
autonumber ID Key. T2 is a list of all of the counties in the state. T3 is
a list of the services I want to search for. T2 & T3 both have their own
autonumber ID Keys and a separate column for either the county or the
service depending on the table and nothing else. T4 is a table that has its
own autonumber entry, a column that is linked to a T1 ID Key, and a column
for the counties. The counties are entered in the form view via a lookup
list based on T2. T5 is the same as T4 except that it relates to T1 and T3,
again with a lookup list that looks into T3 for the data.
I created a form (F1) based on T1. F1 uses two child forms (F2 and F3) that
are based on T4 and T5. This causes access to autolink data entered in F2
and F3 to the parent form F1.
Now I want a query that allows me to enter a county name and it will find
the service providers in that county. Ideally, I would like it to do a
double query, the first to find by county and the second to find by service
so that only those providers of a specific service in a particular county
are listed. This is where I'm running into problems.
The first thing I notice when I run my query is that I type in the county I
want to search for and it gives me an error. After some time I figured out
that for some reason the tables are switching the lookup values to numbers.
So, I figured out that I want to find County D and I type in the
corresponding number, 4, and it retrieves those entries of providers in
County D and lists the county by its name and not the number I just
searched. I tried to set up a query using the service table as well and it
did the same thing. I could change my T1 table to include checkboxes for
the info on the services provided if that would make that part of the query
any easier, but with 93 counties, it's kind of difficult to do that with the
T2/T4 data. And if I don't have to, I really don't want to set it up that
way for T3/T5.
The second thing I've noticed is that when I run the query using the number
search, it will find show multiple results for the same provider. Say
provider A provides services X,Y, and Z in Counties 1,2 and 3. If I search
under County 3, it will show three results for provider A, one for each
entry of X,Y, and Z. Would really like this set up so that I only have to
look at one entry for the same provider if possible.
Any suggestions? I've looked through the reference manual I purchased and
haven't totally found my answer. I've searched the newsgroups and am still
at a loss. I would appreciate responses that are specific on the
programming side so that I can understand exactly what is going on. And
thanks in advance.
Robert
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----