I need to auto-update a field in a table. (1 Viewer)

Officeboy

Registered User.
Local time
Today, 01:25
Joined
Nov 10, 2009
Messages
66
Here's the setup...

Table - General Contractor (tblGeneralContractor)
Primary key - ID
Company Name- txt
First Name-txt
Last name-txt
Address-txt
City-txt Use a look up colum directed under tblOregonCity.City so there is no misspellings of citys when inputed, This is a drop down menu.

County-txt Use a look up colum directed under tblOregonCounty.County so there is no misspellings of Counties when inputed.This is a drop down menu
State-txt
Zip Code - number

Table - Oregon Cities (tblOregonCities)
(Primary key) City - Txt
County - txt Use a look up colum directed under tblOregonCounty.County so there is no misspellings of citys when inputed.

Table - Oregon County (tblOregonCounty)
(Primary Key) COunty - Each county has a unique line in each database.

So, What I want to do is on tblGeneralContractors, select "CITY" from the drop down menu, and have "County" update from the referenced county on tblOregonCities.

I tryed useing querys, I got it to work ON a query, but when I added it to the row source on tblGeneralContractor.County, it was blank when I select the city from the Table.


What do I do?
 

boblarson

Smeghead
Local time
Today, 01:25
Joined
Jan 12, 2001
Messages
32,059
1. You should not be storing the county in the other table. It is already available at any time to use with a query. Storing this info a second time violates the rules of normalization.

2. You can get the county simply by including that table in any query that you have the city in.

3. FYI - You can use a query in 99.9% of the places you can use a table.
 

Officeboy

Registered User.
Local time
Today, 01:25
Joined
Nov 10, 2009
Messages
66
I'm trying that, but it's not working. I'm making an intereface so the county will auto populate the records, can you send me an example on how i'm supposed to fix it then?I dont have the county data duplicated, the list of counties are all on one table in it's self,

So, how should I go about doing this? In my General Contractor table, I need a field for county that I can search by that the information updates when a CSR selects the city from an input form.

If you can post an example of the solution, that would be great.

I can get it to work in a Query just fine, but implementing the association to the General Contractor records is my problem.
 
Last edited:

boblarson

Smeghead
Local time
Today, 01:25
Joined
Jan 12, 2001
Messages
32,059
I'm trying that, but it's not working. I'm making an intereface so the county will auto populate the records, can you send me an example on how i'm supposed to fix it then?I dont have the county data duplicated, the list of counties are all on one table in it's self,

So, how should I go about doing this? In my General Contractor table, I need a field for county that I can search by that the information updates when a CSR selects the city from an input form.

If you can post an example of the solution, that would be great.

It would help if you can post what you have so I can work something out within that framework. I don't have an existing sample that I can upload so if you can give me a head start that would be wonderful.
 

Officeboy

Registered User.
Local time
Today, 01:25
Joined
Nov 10, 2009
Messages
66
here is my DB, It is in Office 2007 right now, so, FYI
 

Attachments

  • Pipeline.zip
    96.3 KB · Views: 132

Users who are viewing this thread

Top Bottom