Results 1 to 3 of 3
  1. #1
    N7925Y is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    32

    Question on building database to run report

    I am in the process of developing an access database for contact management. I have two table: Companies & Contacts, & a form for Contacts data entry. The relationship between these two tables will be based the company name. Each company may have multiple people working for it. In the form I have a combo box that links to the "Companies" table. I look up what company they work for and select it. What I want to do with the database is run a report listing each company and what contacts work for it.

    The problem I'm having is setting up the relationship between the two tables. Do I use the CompanyID to link to the Company in the Contacts table? When I did this the report had an error. Do I use a query to so this? Tired adding the CompanyID to the Contacts table and use a dlookup to populate it when I find the company name but it isn't working.

    I've tried running a report but it doesn't group the company with its contacts.

    Thoughts?

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    No need for a DLOOKUP.
    build a query, join the two tables on CoID.
    Company.CoID is autoNum,
    but Contact.CoID is long integer.

    In the contact entry, put a combo box,to pick Co. name, but the combo assigns the. CoID.

    in the report, group and sort on CO name,
    then sort on contact.

  3. #3
    N7925Y is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    32
    How do i set up a combo box to search for the company name but assign the companyID? Thanks for your help

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

Similar Threads

  1. Question on building a reminder application
    By Ayiramala in forum Access
    Replies: 8
    Last Post: 04-20-2015, 08:29 AM
  2. Replies: 1
    Last Post: 07-28-2014, 01:50 PM
  3. Question in Building an Expression
    By Dmosk319 in forum Queries
    Replies: 1
    Last Post: 03-27-2014, 07:33 AM
  4. Building a survey database
    By cactuspete13 in forum Queries
    Replies: 1
    Last Post: 11-18-2013, 04:22 AM
  5. Need Help Building a small database
    By Darren in forum Access
    Replies: 1
    Last Post: 04-12-2012, 01:20 PM

Tags for this Thread

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