Results 1 to 10 of 10
  1. #1
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67

    Access Form Autofill Option

    I am new to MS Access and so far i have managed to create two table i.e. Employee file & Discrepancy Table. I have created form with name Discrepancy Form.

    Employee File Table Contents

    1) Emp Id
    2) First Name
    3) Last Name

    Discrepancy Table Contents

    1) Emp Id
    2) First Name
    3) Last Name
    4) Date
    5) Amount
    6) Explaination
    7) Type with 2 fileds set (Cashier error & Customer service error)
    8) Status with 2 fields set (New & Reviewed)
    9) Auditor comments

    Finally i have created a form using Discrepancy Table Contents now as mentioned i have emp id in the first box and then followed by rest of the contents. I am willing to insert autofill option in such a way that once i select emp id it should automatically populate first name & last name of the corresponding employee. I am stuck with this problem and i so new to VB & SQL both. I looked various tutorials tried all different options but looks like and i am not writing the correct string in VB editor. I would appreciate if someone could show me both the ways of creating autofill option by coding as well as non-coding both.

  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,521
    See if this helps, including the recommendation to not store the name fields in the second table:

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

  3. #3
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    Quote Originally Posted by pbaldy View Post
    See if this helps, including the recommendation to not store the name fields in the second table:

    http://www.baldyweb.com/Autofill.htm
    Sir i want to make sure if i am understanding u correctly. Based on your reply i need to create table as below pls correct me if i am wrong !!!

    Employee Table

    1) Employee Number --->Primary Key
    2) First Name
    3) Last Name

    Discrepancy Table

    1) Employee Number
    2) Over/Short
    3) Status
    4) Explaination
    5) Auditor Comments

    Then create form importing Discrepancy Table. My question is how would it display first name & last name in form ?

  4. #4
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    or should i use both table when i create a form so that it imports informatin from both table ?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Properly normalized design would not store the names in the second table, just the ID. You'd display the names on the form as discussed in the link. In reports and such you would use queries that joined the two tables together.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    I have attached the DB file for you to help me in the form section i tried doing as mentioned in the link but somehow it's not working pls help.

  7. #7
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    Sir tht link u provided is worth a million I created a combo box and it worked in form. Now I want to autofill first name & last name when I select employee number how wud I do this ?

  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,521
    Have you tried the method detailed in the link? There was no sample attached to the previous post.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    Bingoooooooooo problem solved 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,521
    No problem, and welcome to the site.
    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. Autofill a field once a Form is Selected from Switchboard
    By AccountingStudent in forum Forms
    Replies: 3
    Last Post: 09-13-2011, 11:26 AM
  2. Replies: 5
    Last Post: 09-14-2010, 09:50 PM
  3. Autofill form fields based on another field
    By ljs1277 in forum Access
    Replies: 3
    Last Post: 02-16-2010, 02:51 PM
  4. Autofill with data from another form
    By jacrum in forum Forms
    Replies: 2
    Last Post: 08-11-2009, 11:17 AM
  5. Autofill form fields
    By roboticsguy1988 in forum Forms
    Replies: 1
    Last Post: 08-10-2009, 08:56 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