Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42

    How do I pull address from table onto my report

    Ugh, it's been one of those days.



    See my screenshot.
    I have an "Inbound" form that you enter all of the fields listed.
    The "Cont C/O" field is the same as the "Agent" field in the LOCAL AGENTS Table.
    When I pull my report it pulls ALL of the Agents in the table not just the one selected for this record.

    HELP

    Click image for larger version. 

Name:	Capture.PNG 
Views:	21 
Size:	37.3 KB 
ID:	15819
    Click image for larger version. 

Name:	Capture.PNG 
Views:	21 
Size:	21.9 KB 
ID:	15820
    Click image for larger version. 

Name:	Capture.PNG 
Views:	21 
Size:	70.4 KB 
ID:	15822

  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
    You need a join between the appropriate fields in the 2 tables.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    I tried to join the "Cont C/O" and "Agent" fields but then NO records pull

  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,521
    That would seem to contradict "The "Cont C/O" field is the same as the "Agent" field in the LOCAL AGENTS Table." Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    Quote Originally Posted by pbaldy View Post
    That would seem to contradict "The "Cont C/O" field is the same as the "Agent" field in the LOCAL AGENTS Table." Can you post the db here?
    How do I post the db?

  6. #6
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    I think it may be too big. It will not let me attach it.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If you do a compact/repair then zip, it may work.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    Let's try this!
    Attached Files Attached Files

  9. #9
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    Paul, were you ever able to open my database?

  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
    I was but I got an error on that field, even just trying to sort it. It now occurs to me that I opened it with 2007, so perhaps I'll fire up a VM with 2013 on it and try, since that's what you have.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    Awesome thank you for all your help! Drives me nuts to sort through 100+ pages to find the one I need!

  12. #12
    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 think I see the problem. You've used a lookup field and have incompatible data types. The "Cont C/O" field in the inbound table uses a lookup field, which I don't care for. In any case, the data type of the field it looks up to is Autonumber (the ID field in Local Agents), the field in Inbound is Short Text. It should be Long Integer to be compatible. More on lookup fields:

    http://access.mvps.org/access/lookupfields.htm

    Also, you'll find that having spaces and symbols in your field names isn't worth it in the long run.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Oh, and in the relationships window, your join is to the wrong field in Local Agents. It should be to the ID field, not the Agent field. The lookup field masks what is really being stored in the Inbound table, which is actually the ID field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    I changed the "Cont C/O" field to be a Long Integer. I also updated the relationship to "Cont C/O"(Inbound) to "ID"(Local Agents)
    Now when I run the report I am getting this error
    Click image for larger version. 

Name:	Capture.PNG 
Views:	7 
Size:	30.3 KB 
ID:	15929

  15. #15
    tanyapeila is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Posts
    42
    Ok maybe I did not change the Cont C/O field correctly. This is what I did
    Click image for larger version. 

Name:	Capture.PNG 
Views:	7 
Size:	15.2 KB 
ID:	15930

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need to pull address from first record selected
    By tanyapeila in forum Queries
    Replies: 7
    Last Post: 03-17-2014, 02:55 PM
  2. Replies: 8
    Last Post: 10-23-2013, 04:37 PM
  3. Replies: 2
    Last Post: 03-07-2013, 04:50 PM
  4. Replies: 1
    Last Post: 11-10-2012, 09:13 AM
  5. Replies: 1
    Last Post: 08-31-2012, 01:47 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