Results 1 to 8 of 8
  1. #1
    hensleyj6 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    3

    Filling fields based on lookup field instead of combobox

    What I am trying to do is I am working on a small project to keep track of employees time.
    I have two tables one for employee information and another for saving the times worked.


    I'm trying to get the employees first name, last name, from table a into fields for saving with in and out times into table b.


    I want to be able to have them enter their ID number, and have it populate the above fields automatically so they can be saved into an entry in table b.

    I am currently experimenting with using a combobox at the moment but what i want is to use a text field because I will have a barcode scanner where the ID will be scanned and then afterwards I want it to populate those fields and then from there the time/date is saved into an entry with the information.

    Below is what i have going using the combo and filling the name based on it. but as i said earlier I would like to use the scanner instead.

    Code:
    EID.SetFocus
    EID.Text = Combo21.Column(0)
    First_Name.SetFocus
    First_Name.Text = Combo21.Column(1)
    Middle_Name.SetFocus
    Middle_Name.Text = Combo21.Column(2)
    Last_Name.SetFocus
    Last_Name.Text = Combo21.Column(3)

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You do realize that having the ID in a field allows you to user a query and show both tables and if they were one, right?

  3. #3
    hensleyj6 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    3
    Honestly, no. using access at all is new to me, what i have gotten to this point is from other tutorials and old forum answers. The idea for what I am wanting to do came from a friend who suggested doing this to help instead of doing what i was doing which was manually filling a spreadsheet and using that to track time. Since we have such a small number of people on our payroll they said it would work, and then just print a report like my spreadsheets and i can purge it when its getting too big.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    One of the *big* powers of MS Access is queries with joins. The idea of an RDBMS is that the actual data *only* exists in one table and everyone looks for it there. Joins make that a snap. You also create your relationships and enforce referential integrity to make sure everything stays properly layered.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Here's a link to a slew of data models showing the relationships. It may give you a few ideas about the structure of your database.
    http://www.databaseanswers.org/data_...all_models.htm

  6. #6
    hensleyj6 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    3
    ok great thanks for the link and information I will look at that all. I have been looking for examples as well that i could use, do you have a place where I can find those? I have been searching but I am having no luck as far as finding anything helpful.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you looked at all of the templates that come with Access?

  8. #8
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You might want to work through these tutorials....
    http://www.rogersaccesslibrary.com/forum/forum46.html

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

Similar Threads

  1. Filling two fields with a single lookup
    By cman26 in forum Access
    Replies: 16
    Last Post: 10-20-2014, 05:21 PM
  2. Replies: 4
    Last Post: 05-02-2014, 02:08 PM
  3. Replies: 5
    Last Post: 02-12-2014, 11:52 PM
  4. Replies: 1
    Last Post: 08-07-2011, 03:22 PM
  5. Filling a combobox with field names.
    By millerdav99 in forum Access
    Replies: 1
    Last Post: 04-26-2011, 02:09 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