Results 1 to 3 of 3
  1. #1
    batowl is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    86

    Fill in Fields Based On Contents of Another Field

    I have a database where I am entering data into a table (Table A) through a form.

    Table A is full of patient information, then there are several empty fields relating to the patient's doctor's information (name, doc's address, phone, etc).



    There is also a Table B, which is not on the form, but is full of information on all the doctors who the patient could possibly see.

    What i would like to do is be able to choose the doctor's name from a drop down list in table A (which I have accomplished), and then have the rest of the doctor fields (address, phone, etc.) populate based upon that choice I just made from the drop down list. I know this must be possible, but I have not been able to figure it out. Any suggestions?

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    create a SELECT query that pulls all the data you want. In each of your controls, enter =DLookup("[fieldName]","queryName","[doctorID] = Forms!FormName!comboBoxName")

    Change "[fieldName]" depending on the field you wish to populate (name, address, etc)

  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
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 5
    Last Post: 01-20-2011, 11:36 PM
  2. Replies: 2
    Last Post: 09-20-2010, 09:02 PM
  3. Replies: 0
    Last Post: 06-03-2009, 10:25 PM
  4. Fields and their contents
    By Ham in forum Access
    Replies: 0
    Last Post: 02-06-2009, 07:34 AM
  5. Replies: 1
    Last Post: 10-26-2007, 07:29 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