Results 1 to 3 of 3
  1. #1
    RawToast is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    7

    Filling in a column using data from another table

    I have a list of 4300 clients. The clients' personal information and ID numbers are listed in the table BasicInformation. Another table, DiseasesAndValues lists 17 diseases and a "scheduled value" (long story short - an amount of money) for each disease. Each client has one of these 17 diseases. I would like to have a column in the BasicInformation table which shows the scheduled value for the disease that a particular client has by going back to the DiseaseAndValues table and checking to see what the scheduled value of their disease is. Alternatively, I could use a query that could enter in these values with a click of a button. Any ideas?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Not really understanding what the issue is.

    Each client will have only 1 associated disease? The clients table has a field for the disease ID? Build a query that joins the tables.
    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.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I would create a third table
    "Info_Disease"

    Fields
    Info_DiseasePK (autonumber)
    BasicInformationFK (Number - Long)
    DiseaseAndValuesFK (Number - Long)

    Link the primary key field from "BasicInformation" to the foreign key field "BasicInformationFK" in table "BasicInformation".
    Link the primary key field from "DiseaseAndValues" to the foreign key field "DiseaseAndValuesFK" in table "DiseaseAndValues".

    Have a form in continuous view, The record source would be with table "Info_Disease".
    Have two combo boxes, one bound to the field "BasicInformationFK", the other bound to "DiseaseAndValuesFK" (maybe named cboBasic and cboDisease.

    The row source for cboBasic would be a query based on the table "BasicInformation".
    The row source for cboDisease would be a query based on the table "DiseaseAndValues".

    Set the column widths appropriately

    Without knowing the field names in each table, I can't be more specific.

    Can one client have more than 1 disease??

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

Similar Threads

  1. Auto-filling data
    By Ranger7913 in forum Programming
    Replies: 3
    Last Post: 01-12-2015, 03:26 PM
  2. Replies: 12
    Last Post: 11-11-2014, 02:10 PM
  3. Replies: 1
    Last Post: 02-19-2014, 11:02 AM
  4. Replies: 6
    Last Post: 05-23-2013, 08:14 AM
  5. Replies: 3
    Last Post: 10-16-2012, 10:34 AM

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