Results 1 to 10 of 10
  1. #1
    Shazz123 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    9

    Linking fields help

    I have created a database in which I have a form. I have a combo box which contains the city (linked to a table) & then I have another combo box for the actual address (linked to a table). How do I create something so that when I put in the city the address pre-populates with all the addresses for that one city. Hope that makes sense? Simple instructions as possible please - im still learning.



    Thank you

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Shazz123 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    9
    OK - i think ive now messed it up completely. Is there anyone that could take a look at what ive done & fix it up for me?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You should be able to attach the db here, after compact/repair and zipping.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Shazz123 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    9
    I think it is attached?
    Attached Files Attached Files

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I don't see where you've tried either method. Normally the City ID field would be stored in the addresses table, not the city name (that's part of what the ID is for). You can do it with the name, but what if you have 2 with the same name?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Shazz123 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    9
    Sorry - i dont think im understanding where everything needs to go. I understand what you are saying with regards to the city id so obviously i need to change the names to be an id but im not sure what i need to do after that

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    If you're not sure how/where to enter code, this may help:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    Shazz123 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    9
    I did have it working but now its not & i cant get it to work again. What am I doing wrong? Have attached
    Attached Files Attached Files

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Names are goofy, "state" for city and "city" for address?? Both combos need the column count and column widths fixed. There are two events in the VBA editor for the same event, so that causes an error.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 06-01-2015, 04:07 PM
  2. Joining/linking two fields
    By Access_Novice in forum Queries
    Replies: 5
    Last Post: 12-21-2014, 07:47 PM
  3. Replies: 0
    Last Post: 03-04-2011, 10:28 AM
  4. Fields not Linking to Table
    By jlclark4 in forum Forms
    Replies: 2
    Last Post: 12-20-2010, 08:04 AM
  5. Linking form fields
    By rev_ollie in forum Forms
    Replies: 15
    Last Post: 07-09-2010, 06:10 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