Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    jgalloway is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    21
    I thought about it and would it be better to keep my Zip, State, and City in one table instead of 3 like I had before?

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    It would probably work just fine as one table. Not strictly normalized data because of the repetitive values in fields, which you have anyway in the ZipCodes table (City and StateCode field). You just have to decide how far you want to carry out normalization.

    The RecordSource for the SalesReps form would still involve two joins to same table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    jgalloway is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    21
    Here is the updated zip, state, city, county.

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Okay, you have not implemented my suggestion. Do you want to repeat the city/state/county information in the SalesReps and AccountManagers tables or do you want to use relational link?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    jgalloway is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    21
    I changed the table to show all of the citystatezip in just one table. I figure this would be simpler and keeping information in just one area. What ever would be the best way.

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    The 'best' way is to take advantage of the relational characteristics of Access database as much as needed to make life less frustrating. This will eliminate the duplication of city/county/state/zip data in SalesReps and AccountManagers tables. You will not have to manually enter the data repeatedly nor have to implement any code to automate entry. Yes, the single zip table has a lot of repeated data but only have to do it once. Once the lookup table is built it is done, unless USPS adds new zip codes, or the county boundaries are redrawn, or add a new city record. How often will these events happen?

    You can't use the zip code as primary key. You need to add an autonumber field to the ZipCodeCityStateCounty table and this will become the primary/foreign key link with the other tables. So need number field in SalesReps and AccountManagers for the foreign key, maybe call ZipStCityCty or ZSCC, whatever.

    Just gotta decide.

    BTW, be aware Alaska doesn't have counties, they are Boroughs (Louisiana has parishes).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #22
    jgalloway is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    21
    Sorry but I am VERY new. Seriously I don't understand what you are really wanting me to do here. What would be the way that you would do this and how to build the relationship or what exactly would you do to make this work?

    I am at my wits end. I hate asking this but can you do this and this way I can look at how you got this to work. Then I can start to understand.

    Again I am very sorry for asking this but I am getting more frustrated without understanding.

  8. #23
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    What you need is an understanding of relational database concepts. What primary and foreign keys are and how to use them. Then the instructions I have already offered should be elementary. This is basic Access functionality.

    For starters, review the 'sticky' thread tutorials here http://forums.aspfree.com/microsoft-access-help-18/

    If I were doing this project:
    1. Need a unique value in the ZipCodeCitySateCounty table to serve as primary key. Autonumber field will serve.

    2. Need fields in SalesReps and AccountManagers to hold the Zip table primary key value as a foreign key. This will establish a link between the tables.

    3. Fix the SalesReps RecordSource to be a query that joins tables - as previously described.

    4. Bind textboxes on the form as previously described.

    5. Have multi-column comboboxes on the form to select the correct Zip record. These comboboxes will be bound to the foreign key fields. This will save the linking value so records can be related.

    Alternative is to save zip/city/state/county into every record as you currently have set up. Means either manually selecting each value or writing code to find the values. Both are aggravations I would avoid. I would use the relational arrangement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #24
    jgalloway is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    21
    Thanks but I am not getting this. Thanks to everybody for the help and especially to you June7. I give up even though I understand this is beginners stuff but I've went through all of the tutorials and can't find anything that will help.

  10. #25
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You were starting to get the idea of relational concept because you did set up the Reps and Managers correctly. The location info was a bit more complicated but still uses same principle. So maybe seeing will help. Attached is a revision of your db demonstrating what I suggested. I will remove it in a few days or after you respond.

    The zip code table had duplicate records, almost double, I eliminated the duplication.

    EDIT: Purpose served, file removed.
    Last edited by June7; 09-20-2011 at 07:03 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #26
    jgalloway is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    21
    Okay it did plop the switch. I understand what you were talking about after seeing this. I was trying something different instead of making the drop down box in one area. I was trying to just go off the zip code at first.

    THANK YOU!!!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Having trouble with autofill
    By Kerrydunk in forum Forms
    Replies: 1
    Last Post: 04-25-2011, 11:26 PM
  2. Yet Another autofill question
    By srcacuser in forum Database Design
    Replies: 1
    Last Post: 01-29-2011, 11:05 AM
  3. Autofill
    By kdcooper88 in forum Access
    Replies: 1
    Last Post: 09-18-2010, 05:52 AM
  4. ComboBox Autofill
    By t_dot in forum Forms
    Replies: 2
    Last Post: 08-19-2010, 06:18 AM
  5. Looking up a zipcode
    By rbw95662 in forum Forms
    Replies: 1
    Last Post: 03-24-2010, 05:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums