Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2012
    Posts
    23

    Form for new data entry which link to another table

    Dear all,



    I have created a form in which i can input new records. In the form you have to input the personnel ID and name. But I also have a table with all employees in the company with their ID numbers. So basically I could develop the the form in a way in which I enter the number in box and the name automatically pops up (like a vlookup in word).

    Does any know how i can achieve this?

    Dear regards, Marc

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    One method is to have a multi-column combobox that has columns for the ID and name. Review: http://datapigtechnologies.com/flash...combobox3.html
    Then a textbox references the combobox column that has the name.

    Another method is to include the employees table in the form RecordSource - join type would be "Show all records from <table> and only those records from Employees that match". Then have textbox bound to name field from Employees table. Set it as Locked Yes, TabStop No.
    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. #3
    Join Date
    Oct 2012
    Posts
    23
    Thanks, I get the first method. Thing i do not understand however, how do you get the "second value" in the text box? How do you link it?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    In textbox ControlSource:

    =comboboxname.Column(1)

    Combobox column index begins with 0 so if the name is in second column the index is 1.
    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.

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

Similar Threads

  1. Replies: 6
    Last Post: 10-22-2022, 08:27 AM
  2. Make a form for table data entry
    By marcvanderpeet12 in forum Forms
    Replies: 1
    Last Post: 10-10-2012, 06:27 AM
  3. Replies: 25
    Last Post: 08-01-2012, 05:22 PM
  4. Replies: 3
    Last Post: 02-07-2012, 06:33 AM
  5. Multi-table Data entry form
    By halpme in forum Forms
    Replies: 3
    Last Post: 11-10-2011, 02:48 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