Results 1 to 4 of 4
  1. #1
    gjt211 is offline Novice
    Windows 8 Access 2007
    Join Date
    Feb 2015
    Posts
    2

    Help with multi table lookups report needed

    Hi,


    I am new here and don't really know how to achieve what I want to do. I will give some background on what I have and what I would like and hope someone here can provide me some guidance.
    My Access experience is very limited, so please don't shoot me down if I ask the wrong questions, use the wrong terms, or seem stupid. Thanks in advance.

    I have an Access 2007 database that has about 10 tables.
    There are two main tables (I only use the term 'main' as they are the tables that store all the site information);
    The first one contains data for site locations and several lookup fields to populate the 'site data table' information (such as location, site class etc).
    The second main table contains data for companies and several lookup fields to populate the 'companies' information (such as location, phone number, etc).
    The second table (companies) also has a multi-select lookup to the first main table (site data table) so I can mark what companies are related to the site data.

    I have created a report for the 'site data table' that works well, however I would like to add to each report record all the 'companies' that have been assigned/related to that specific site.
    I don't even know how to ask a question in google on how to do this. I am not sure where to start.

    Could anyone please provide me some help to get started?

    Kind regards

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Hi and welcome to the forum........

    Lookup FIELDS are generally considered Bad. From my reading, most (but not all) experienced programmers avoid the use of lookup FIELDS.

    Read these:
    The Ten Commandments of Access
    http://access.mvps.org/access/tencommandments.htm
    Expecially see #2 & #3


    The Evils of Lookup Fields in Tables
    http://access.mvps.org/access/lookupfields.htm


    I NEVER use Lookup FIELDS nor Multi-Value Fields. Search the forum and you will find (most) experienced programmers do not use Multi-Value Fields.


    Having said that, here are two links about using Multi-Value Fields:
    http://www.utteraccess.com/forum/Mul...-t1984616.html

    https://support.office.microsoft.com...rs=en-US&ad=US
    (I know it is long, but it is a MS link)


    I googled:
    "ms access 2010 multi value fields"


    This might help; Allen Browne provides code to concatenate values from related records:
    http://allenbrowne.com/func-concat.html

    Good luck with your project

  3. #3
    gjt211 is offline Novice
    Windows 8 Access 2007
    Join Date
    Feb 2015
    Posts
    2
    Hi Steve, and thanks for your reply. It is greatly appreciated.
    I have read a little before about people saying not to use lookup fields, but that leaves me a little lost.

    I was always told not to store the same data twice. It is not good practice. So I create a table, lets say city names, and populate that with text data containing the cities I want in my list. How do I go about seeing those in my main table that only stores the ID? I may have more than one table the needs to use the city names.

    Sorry if I seem not too bright, but isn't the whole idea to create relational databases? Isn't the lookup field type just creating a relationship?

    Once again, thanks for your kind words of wisdom.

  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,930
    The advice is to not use lookups in table - build combo and list boxes on form.

    Build queries that join tables so related info is available.

    Your report RecordSource can be a query that joins those tables or can be report/subreport arrangement.
    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: 13
    Last Post: 11-27-2014, 10:18 AM
  2. Replies: 7
    Last Post: 09-06-2011, 08:00 PM
  3. Multi table query & report
    By memphis212 in forum Queries
    Replies: 3
    Last Post: 07-12-2011, 10:59 PM
  4. Optimising lookups in a large fixed table
    By u38cg in forum Queries
    Replies: 4
    Last Post: 06-22-2011, 08:21 AM
  5. No Lookups in a Table
    By oleBucky in forum Database Design
    Replies: 9
    Last Post: 03-23-2011, 01:40 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