Results 1 to 7 of 7
  1. #1
    Appollobsg75 is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2022
    Posts
    13

    Creating a Report and needing to Pull data from another table

    Hello I created a database CAHS Hour Tracker, and i have a form for data entry, it has 3 combo boxes the first is Employee name, 2nd is function and 3rd is outputs. The first combobox is pulling from CustomerID table the 2nd and 3rd are pulling from OutputsT. When I pull the data onto the report for the Employee Name it only gives me the WorkID number, I was hoping to be able to pull in the names on the report so i can group or soft by name. Is there a way I can relate the field to the CustomerID_Employee name to the WorkID and only pull the names? I think that is happening when I try outputs as well.
    Attached Files Attached Files

  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
    I don't see a report, but the solution is to base it on a query that joins the different tables together on the appropriate field(s). That enables you to get the names.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    By the way, the data types need to match. If the ID field in the customer table is autonumber then the employee field in the hours tables needs to be Long Integer.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Appollobsg75 is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2022
    Posts
    13
    Thank you for the suggestion. I do not have a report cause, I'm trying to figure out how to get the information I want on the report. I have tried but it only pulls over the numbers. I'm looking at what you have stated, and I tried to create the query using both the Customerid table and the HourtrackerT,. I went into both and your are correct my customer id table has an autonumber, but I can't change the type in the HourtrackerT table since I want it to show up as text not a number. So I tried to also create a relationship between a workdid and trackerid in a query when i added both tables but it still did not work. when i looked at the table in spreadsheet view it only shows the number for the employee name. I do apologize, I have a intermediate level of training with Access, i have done report before but this is a little different. Thanks for your help.

  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
    The data type needs to match what you're storing, which is the ID (and this is normal, we typically save ID's in this situation). Change that data type to Number/Long Integer and you should be able to join the tables and show the name on the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Please have a look at the attached updated file, hopefully would give you a push on the right path .

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #7
    Appollobsg75 is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2022
    Posts
    13
    Thanks Vlad and Paul, I understand what each of you are saying and it appears that I might have figured it out. Vlad in your changes that you made, when I run the query report the names and things are there, but you have multiple entries and some of the functions do not match their outputs. Do I need to create a table with function and outputs that match up before I can have them correspond correctly? When I try and setup the way you have it, i loose the functionality on my combo boxes. I put on m functionsT combo box me.cboOutputs=null and me.cboOutputs.requery, but when I select the function and then want to see only those that correspond I do not see them I see all the Outputs. I have even tried it the way you have it and still I only get all the outputs I do not get the outputs that are specific to the function. I think Im doing something wrong but can't find it.

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

Similar Threads

  1. Replies: 12
    Last Post: 10-21-2017, 04:05 PM
  2. Replies: 9
    Last Post: 06-15-2017, 03:00 PM
  3. Pull corresponding data into report
    By mrt1069 in forum Reports
    Replies: 3
    Last Post: 08-29-2016, 02:29 PM
  4. Replies: 2
    Last Post: 03-07-2013, 04:50 PM
  5. Replies: 6
    Last Post: 02-25-2013, 07:27 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