Re: Help!!! Autolookup

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mike Farmer (farmer.m_at_comcast.net)
Date: 02/12/04


Date: Thu, 12 Feb 2004 02:37:24 GMT

John, thanks for your response. With lots of help from another expert,
I've gone in a different direction and I have been able to get
autolookup to work.

I'm still puzzled by your "should not exist" comments. maybe I failed to
explain myself properly.

The data base I'm working on has many tables, one of whch is a "Zipcode"
table containing over 4,000 zip codes along with the corresponding city,
state & county.

I have a "form" with many fields which polulates other tables. Three of
the fields are City, state & zip. When I go to fill out the form and I
come to the "address" information, I wanted to be able to enter a zip
code and "grab the city & state from the table. The same with the
physicians information. I wanted to be able to enter a physician's nane
and then grab the "specialty & designation from the physicians table. I
probably confused things by mentioning the the "zip codes" and the
"doctors specialty and desination" fields. These are two separate
tables, neither containing the same information.

Thank you for your kindness in responding. Now I have a new problem for
my next post.

regards,
Mike

> On Mon, 09 Feb 2004 19:00:58 GMT, Mike Farmer <farmer.m@comcast.net>
> wrote:

>>I am attempting to have certain fields automatically filled in (City,
>>State) when I enter the zip code. I have a number of tables that are
>>populated by the form and I also have a table that contains: zip code,
>>city, state, county. I've tried following the various instructions but
>>nothing works. I also want to be able to enter a doctors name and have
>>the form automatically fill in the designation and specialty. This
>>information is also contained in another simple table. No Primary Keys
>>used. Everything I read talks about "One To Many Relatioships" but
>>that does not seem applicable here as all of the specied info is one
>>table. Any help would be much appreciated.

John Vinson wrote:

>
> Relationships DO matter here. You're missing a key point about how
> databases *work*.
>
> The City, State, and County fields SHOULD NOT EXIST in this table.
> The Specialty and Designation fields SHOULD NOT EXIST in this table.
>
> You are making the very common assumption that you must have all the
> information you want to see as fields in one single table. This
> assumption is incorrect!
>
> Instead, store *JUST* the Zip, and just the Doctor's primary key ID
> (yes, every single table should have a primary key), in this table.
> Then create a Query joining your table to the zipcode table by Zip,
> and pull up the city and state from the zipcode table; join the
> Doctors table by DoctorID, and pull up the doctor's name, specialty,
> etc. from the Doctors table. This Query can be used as the source of a
> Form or a Report; you don't need to store the information redundantly
> in two separate tables.
>
> John W. Vinson[MVP]
> Come for live chats every Tuesday and Thursday
> http://go.compuserve.com/msdevapps?loc=us&access=public



Relevant Pages

  • City to Pay Doctors to Contribute to Database
    ... City to Pay Doctors to Contribute to Database ... For Dr. Harvey Benovitz, who graduated from medical school in 1962, ... it is as profound a shift in the way he treats patients as advances ...
    (comp.dcom.telecom)
  • Re: A Nostalgic Promo Item I found
    ... There are very few county ordinances, ... in some areas codes are lax but there ... Codes and enforcement vary by the city or town. ... estate you come across more like a tenant. ...
    (rec.food.cooking)
  • Re: Combo Box /Row Source Help
    ... You have an option group where you can select County, City and Company. ... provided the SQL for Combo2 to select the doctors. ...
    (microsoft.public.access.forms)
  • Re: Match 2 different zip code lists
    ... Say you want to return city to column D of the short list: ... Use the mouse or keyboard to switch to the long list workbook/worksheet. ... Then you only need to adjust the index for each result county, city, etc. ... use all the Illinois zip codes matched to a smaller IL zip codes list- so I can match same zip codes and corresponding county? ...
    (microsoft.public.excel)
  • Re: macro that will fill in state and zip when a certain city is t
    ... Then how will you look up ZIP codes and find the corresponding city and ... just use the existing table in your lookup and pull ... "Rick B" wrote: ...
    (microsoft.public.access.formscoding)