Results 1 to 5 of 5
  1. #1
    pmangan is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    21

    Combo box selection from different table stores as foreign key

    Hello,
    I am a beginner with MS Access. Thank you in advance for your input.
    I am working on a form, Transaction_F which is meant to create a new record in Transaction_T.
    Transaction_T has the foreign key Account_ID from Account_T, they are related.
    I would like the form to display the field Account_Name from Account_T but store in Transaction_T as the foreign key, Account_ID. Do I accomplish this with an input mask? or is there a way to display a different field on Transaction_F based on the foreign key? I hope I am explaining this well, as I said I am a beginner. Please let me know if I should explain anything further.


    Thanks.

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi
    Can you upload a zipped copy of the database?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    No input mask. You don't manually control this, you let Access do it behind the scenes, provided your tables design is correct (which it seems it is). If your form is for showing account details and a list of transactions for that account, your form setup should be main form (account details) with subform (transaction list). Each form should be based on a query rather than a table (IMO) and the 2 forms joined via master/child fields properties. Properly set up, each time you add a transaction the account id gets stored in accounts_t regardless of how/where you show the account name.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    pmangan is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    21
    Quote Originally Posted by Micron View Post
    No input mask. You don't manually control this, you let Access do it behind the scenes, provided your tables design is correct (which it seems it is). If your form is for showing account details and a list of transactions for that account, your form setup should be main form (account details) with subform (transaction list). Each form should be based on a query rather than a table (IMO) and the 2 forms joined via master/child fields properties. Properly set up, each time you add a transaction the account id gets stored in accounts_t regardless of how/where you show the account name.
    Thanks so much for the reply. It has become apparent to me that I need more foundational knowledge. Is there a free training on youtube that this forum supports or prefers?

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    I'd say we all have our favourites. Any Google search on a topic will usually return more results than you could ever read up on. Some say Steve Bishop is a good go-to source for video tutorials. Here's what I usually recommend for novices as I prefer to read rather than watch:

    Normalization Parts I, II, III, IV, and V
    http://rogersaccessblog.blogspot.com...on-part-i.html
    and/or
    http://holowczak.com/database-normalization/

    Entity-Relationship Diagramming: Part I, II, III and IV
    http://rogersaccessblog.blogspot.com...ng-part-i.html

    How do I Create an Application in Microsoft Access?
    http://rogersaccessblog.blogspot.com...cation-in.html

    Naming conventions - http://access.mvps.org/access/general/gen0012.htm
    https://www.access-programmers.co.uk...d.php?t=225837

    What not to use in names
    - http://allenbrowne.com/AppIssueBadWord.html

    About Auto Numbers
    - http://www.utteraccess.com/wiki/Autonumbers
    - http://access.mvps.org/access/general/gen0025.htm

    The evils of lookup fields - http://access.mvps.org/access/lookupfields.htm
    Table and PK design tips - http://www.fmsinc.com/free/newtips/primarykey.asp
    About calculated table fields - http://allenbrowne.com/casu-14.html
    About Multi Value Fields - http://www.mendipdatasystems.co.uk/m...lds/4594468763
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Design table relationship for multiple stores
    By Mariam in forum Database Design
    Replies: 3
    Last Post: 09-25-2020, 02:04 PM
  2. Replies: 3
    Last Post: 01-20-2017, 03:21 PM
  3. Replies: 8
    Last Post: 05-08-2012, 03:20 PM
  4. Replies: 2
    Last Post: 04-17-2012, 12:18 PM
  5. Selection in Combo Box to set Yes/No in a Table?
    By alpinegroove in forum Forms
    Replies: 1
    Last Post: 01-08-2012, 06:24 PM

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