Results 1 to 10 of 10
  1. #1
    oollie2 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Location
    UK
    Posts
    9

    Linking two tables to auto populate a field.


    Views: 4 Size: 404.0 KB">Database1.accdb


    In the attached database there are two tables, tblUser and tblTime.

    When the operator is selected within tblTime, I would like the ContractedHours field to change relevant to the fixed data in tblUser.

    For examble tblUser has the UserLogin of Ollie, with a ContractedHours value of 8:00.

    When Ollie is selected in tblTime, I would like the ContractedHours field in this table to also display 8:00.

    Any help is massively appreciated!

  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
    Does this help?

    BaldyWeb - Autofill
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    oollie2 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Location
    UK
    Posts
    9
    Unfortunately the link seems to apply to auto filling data on a form based on a tables values, whilst I need to display data from one table on to another. Thank you however!

  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
    If you're saying you want it to happen while in the table itself, most of us never let users work directly with tables or queries. Data would be manipulated through forms, and the method above would do what you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    oollie2 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Location
    UK
    Posts
    9
    The auto link needs to happen within the table itself however users will not be working directly with a table or query.

  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 know of a way within a table of having one field fill in when you enter something in another one. The exception is calculated fields, but they can't pull from other tables. Why does the link have to happen in the table if the users will be using a form?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    oollie2 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Location
    UK
    Posts
    9
    When the user enters data, the form automatically sets their operator name when they logged in, the user then inputs the data into the table, which using the linked value a calculation occurs to then send data to a seperate form. In the most basic of ways.

  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 they're using a form, why doesn't the method in the link work for you? I guess I'm confused.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    oollie2 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Location
    UK
    Posts
    9
    In the end, I managed to do this using a query to find values when Operator in tblTime is equal to UserLogin in tblUser, this showed a dropdown list of possible times, only being one value. I then set the combo box on the form to pick the first value on load. Thanks for the help!

  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
    Glad you got it sorted.
    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: 7
    Last Post: 08-19-2016, 08:16 AM
  2. Linking Forms-Auto Populate Form A to Form B
    By Holli in forum Programming
    Replies: 6
    Last Post: 01-09-2015, 08:40 AM
  3. Replies: 1
    Last Post: 06-24-2014, 01:31 PM
  4. Replies: 4
    Last Post: 08-20-2013, 08:46 AM
  5. Auto Populate a tables field
    By superjeff in forum Access
    Replies: 3
    Last Post: 09-12-2012, 12:25 PM

Tags for this Thread

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