472,145 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Populate 2nd Form Control and Table

Using Access '97

Hi there, am wondering if someone can please help me with the following:

I have a master table (T_INVESTIGATION) that contains the following fields as well as other fields.

T_INVESTIGATION
LOC_CODE,
STR_ADDR,
CITY,
STATE,
ZIP_CODE
COST_CTR,
SITE_LOC

I also have some LOOKUP tables that are linked to T_INVESTIGATION fields
LT_LOC_CODE
LT_STR_ADDR
LT_CITY,
LT_STATE,
LT_ZIP_CODE
LT_COST_CTR,
LT_SITE_LOC


I have a lookup table associated with each of the 7 field listed above. I have been asked for the following:

1) Set up the form so that when someone clicks on the LOC_CODE control on the form that the STR_ADDR, CITY, STATE and ZIP_CODE all populate automatically so the end-user doesn't have to make an entry for the STR_ADDR, CITY, STATE and ZIP_CODE. After making the selection, by all means, all controls MUST populate the information into the T_INVESTIGATION table fields accordingly for each record.

2) Set up the form so that when someone clicks on the COST_CTR drop-down control (which is tied to the LT_COST_CTR lookup table) on the form that the SITE_LOC control populates with a listing according to the selection the end-user makes. Both of these need to be populated into the T_INVESTIGATION table fields as well for each record.

In other words, if I select COST_CTR 100 from the drop-down list, I will only see SITE_LOC ( 12, 13, 14, 15) and therefore, I make my selections of COST_CTR = 100 and SITE_CTR = 12 and these selections get populated in the T_INVESTIGATION table in the two different fields. If I select COST_CTR 200, I will only see SITE_LOC (22, 23, 24, 25) and therefore, I make my selections of COST_CTR = 200 and SITE_CTR = 24, and of course these get populated as well into the T_INVESTIGATION table in the two different fields.

I hope this is described clearly enough for someone to help me.

Thank you VERY MUCH
Aug 20 '07 #1
1 1653
MMcCarthy
14,534 Expert Mod 8TB
The first thing you need to do is add STR_ADDR, CITY, STATE and ZIP_CODE to the LT_LOC_CODE table. If they are related and dependent on LOC_CODE they should be in the same table.

Once you have done this then the values shouldn't be also stored in the T_INVESTIGATION table as this is duplication of information. You will need to follow similar rules for the COST_CTR.

Have a look at this tutorial on Table Structures.

Database Normalization and Table Structures
Aug 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Junior | last post: by
3 posts views Thread by David | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.